MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029152Open CASCADE[OCCT] OCCT:Codingpublic2017-09-28 13:042018-06-29 21:19
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 7.2.0 
Target Version[OCCT] 7.3.0Fixed in Version[OCCT] 7.3.0 
Summary0029152: Coding Rules - eliminate GCC compiler warnings -Wmisleading-indentation when using MinGW
DescriptionThere is a set of compiler warnings which is generated by GCC7.1 coming with MinGW-w64:
C:\occt_mingw64\src\OSD\OSD_Directory.cxx: In member function 'void OSD_Directory::Build(const OSD_Protection&)':

C:\occt_mingw64\src\OSD\OSD_Directory.cxx:128:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  
if (  dirName.IsEmpty ()  )
  ^~
C:\occt_mingw64\src\OSD\OSD_Directory.cxx:132:3: note: ...this statement, but the latter is misleadingly 
indented as if it were guarded by the 'if'
   Standard_Boolean isOK = Exists();
   ^~~~~~~~~~~~~~~~
C:\occt_mingw64\src\OSD\OSD_Disk.cxx: In function 'void _osd_wnt_set_disk_name(TCollection_AsciiString&, 
const OSD_Path&)':
C:\occt_mingw64\src\OSD\OSD_Disk.cxx:365:4: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
    
for ( i = 3, k = 0; i <= j; ++i )
    ^~~
C:\occt_mingw64\src\OSD\OSD_Disk.cxx:382:5: note: ...this statement, but the latter is misleadingly indented 
as if it were guarded by the 'for'
     if ( k == 0 )
     ^~
C:\occt_mingw64\src\OSD\OSD_File.cxx: In member function 'void OSD_File::BuildTemporary()':
C:\occt_mingw64\src\OSD\OSD_File.cxx:1457:17: warning: ISO C++ forbids converting a string constant to 
'wchar_t*' [-Wwrite-strings]
                 };
                 ^
TagsNo tags attached.
Test case numberNot required
Attached Files

- Relationships
related to 0029151closedabv Coding Rules - eliminate GCC compiler warnings -Wimplicit-fallthrough 

-  Notes
(0070947)
git (administrator)
2017-09-28 21:30

Branch CR29152 has been created by kgv.

SHA-1: f96dad9b47183dd0581cfdbdcdf5edf2ad54a5b0


Detailed log of new commits:

Author: kgv
Date: Thu Sep 28 21:29:22 2017 +0300

    0029152: Coding Rules - eliminate GCC compiler warnings -Wmisleading-indentation when using MinGW
(0070948)
git (administrator)
2017-09-28 21:48

Branch CR29152 has been updated forcibly by kgv.

SHA-1: 6e31163292ec6b5d5e475d6cb21f175b00ccfd3c
(0070951)
kgv (developer)
2017-09-29 01:20

Patch is ready for review.
http://jenkins-test-10.nnov.opencascade.com/view/CR29152-master-KGV/ [^]
(0070966)
abv (manager)
2017-09-29 11:51

How can I review it? These files are completely rewritten, and there is no description of the actual changes made!
(0070967)
kgv (developer)
2017-09-29 11:53

The warning is generated for badly formatted code, hence patch applies reformatting.
(0070968)
git (administrator)
2017-09-29 12:07

Branch CR29152 has been updated forcibly by kgv.

SHA-1: e43f2ed0959d1e7002c02ef0f7e693b5eda9eed5
(0070969)
kgv (developer)
2017-09-29 12:08

0029152: Coding Rules - eliminate GCC compiler warnings -Wmisleading-indentation when using MinGW

OSD_File::myFileHandle/myIO pair is now switched within class definition
instead of myFileHandle_is_only_for_Windows/myFileChannel_is_only_for_Linux macros.

Unused field OSD_Disk::myQuotaSize has been removed.

OSD_Directory/OSD_Disk/OSD_File methods implementation of WinAPI/non-WinAPI
has been merged within .cxx file and reformatted.
Resolved several inconsistences on handling invalid input
between WinAPI/non-WinAPI implementations.
NCollection_Array1 is now used in several places instead of
raw memory allocation (HeapAlloc()/HeapFree()/new/delete).
TCollection_ExtendedString is used instead of StringCchCopyW.
(0071081)
git (administrator)
2017-09-29 20:19

Branch CR29152_1 has been created by abv.

SHA-1: eacfa8cae64b3e0721d234fd2e55a5b16f6a5400


Detailed log of new commits:

Author: kgv
Date: Thu Sep 28 21:29:22 2017 +0300

    0029152: Coding Rules - eliminate GCC compiler warnings -Wmisleading-indentation when using MinGW
    
    OSD_File::myFileHandle/myIO pair is now switched within class definition
    instead of myFileHandle_is_only_for_Windows/myFileChannel_is_only_for_Linux macros.
    
    Unused field OSD_Disk::myQuotaSize has been removed.
    
    OSD_Directory/OSD_Disk/OSD_File methods implementation of WinAPI/non-WinAPI
    has been merged within .cxx file and reformatted.
    Resolved several inconsistences on handling invalid input
    between WinAPI/non-WinAPI implementations.
    NCollection_Array1 is now used in several places instead of
    raw memory allocation (HeapAlloc()/HeapFree()/new/delete).
    TCollection_ExtendedString is used instead of StringCchCopyW.
    
    Obsolete code fragment "for Visual Age compiler" is removed.
    Macro __try is undefined before redefinition on MinGW to avoid warning.
(0071097)
git (administrator)
2017-10-01 21:08

Branch CR29152_1 has been updated forcibly by abv.

SHA-1: 18002ba46b1f521758fc8d97984996b96eed7073
(0071098)
git (administrator)
2017-10-01 21:10

Branch CR29152_1 has been updated forcibly by abv.

SHA-1: fcaee9b15b80be3e1ce456bc5f145734068723ce
(0071099)
abv (manager)
2017-10-01 21:11

Reviewed with some additional corrections, see branch CR29152_1
(0071102)
git (administrator)
2017-10-01 22:06

Branch CR29152_1 has been updated forcibly by abv.

SHA-1: 0e7bc01a3198b0db56f1ca34d27200ecef234ca2
(0071136)
bugmaster (administrator)
2017-10-03 09:41

Tested in framework of testing issue 29170
(0071467)
git (administrator)
2017-10-14 12:20

Branch CR29152 has been deleted by kgv.

SHA-1: e43f2ed0959d1e7002c02ef0f7e693b5eda9eed5
(0071468)
git (administrator)
2017-10-14 12:20

Branch CR29152_1 has been deleted by kgv.

SHA-1: 0e7bc01a3198b0db56f1ca34d27200ecef234ca2

- Related Changesets
occt: master cda06ac0
Timestamp: 2017-09-28 18:29:22
Author: kgv
Committer: bugmaster
Details ] Diff ]
0029152: Coding Rules - eliminate GCC compiler warnings -Wmisleading-indentation when using MinGW

OSD_File::myFileHandle/myIO pair is now switched within class definition
instead of myFileHandle_is_only_for_Windows/myFileChannel_is_only_for_Linux macros.

OSD_Directory/OSD_Disk/OSD_File methods implementation of WinAPI/non-WinAPI
has been merged within .cxx file and reformatted.
Resolved several inconsistences on handling invalid input
between WinAPI/non-WinAPI implementations.
NCollection_Array1 is now used in several places instead of
raw memory allocation (HeapAlloc()/HeapFree()/new/delete).
TCollection_ExtendedString is used instead of StringCchCopyW.

Unused field OSD_Disk::myQuotaSize and not implemented methods OSD_Disk::*Quota*() have been removed.

Obsolete code fragment "for Visual Age compiler" is removed.
Macro __try is undefined before redefinition on MinGW to avoid warning.
mod - src/OSD/OSD_Directory.cxx Diff ] File ]
mod - src/OSD/OSD_Directory.hxx Diff ] File ]
mod - src/OSD/OSD_Disk.cxx Diff ] File ]
mod - src/OSD/OSD_Disk.hxx Diff ] File ]
mod - src/OSD/OSD_File.cxx Diff ] File ]
mod - src/OSD/OSD_File.hxx Diff ] File ]
mod - src/OSD/OSD_FileNode.cxx Diff ] File ]
mod - src/OSD/OSD_signal.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2017-09-28 13:04 kgv New Issue
2017-09-28 13:04 kgv Assigned To => kgv
2017-09-28 13:04 kgv Relationship added related to 0029151
2017-09-28 21:30 git Note Added: 0070947
2017-09-28 21:48 git Note Added: 0070948
2017-09-29 01:20 kgv Note Added: 0070951
2017-09-29 01:20 kgv Assigned To kgv => abv
2017-09-29 01:20 kgv Status new => resolved
2017-09-29 10:11 kgv Description Updated View Revisions
2017-09-29 11:51 abv Note Added: 0070966
2017-09-29 11:51 abv Assigned To abv => kgv
2017-09-29 11:51 abv Status resolved => feedback
2017-09-29 11:53 kgv Note Added: 0070967
2017-09-29 12:07 git Note Added: 0070968
2017-09-29 12:08 kgv Note Added: 0070969
2017-09-29 12:08 kgv Assigned To kgv => abv
2017-09-29 12:08 kgv Status feedback => resolved
2017-09-29 20:19 git Note Added: 0071081
2017-10-01 21:08 git Note Added: 0071097
2017-10-01 21:10 git Note Added: 0071098
2017-10-01 21:11 abv Note Added: 0071099
2017-10-01 21:11 abv Assigned To abv => bugmaster
2017-10-01 21:11 abv Status resolved => reviewed
2017-10-01 22:06 git Note Added: 0071102
2017-10-03 09:41 bugmaster Note Added: 0071136
2017-10-03 09:41 bugmaster Status reviewed => tested
2017-10-03 09:52 bugmaster Test case number => Not required
2017-10-06 14:55 bugmaster Changeset attached => occt master cda06ac0
2017-10-06 14:55 bugmaster Status tested => verified
2017-10-06 14:55 bugmaster Resolution open => fixed
2017-10-14 12:20 git Note Added: 0071467
2017-10-14 12:20 git Note Added: 0071468
2018-02-20 12:59 user533 Target Version 7.4.0* => 7.3.0
2018-06-29 21:15 user533 Fixed in Version => 7.3.0
2018-06-29 21:19 user533 Status verified => closed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker