MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #29152 All Revisions ] Back to Issue ]
Summary 0029152: Coding Rules - eliminate GCC compiler warnings -Wmisleading-indentation when using MinGW
Revision 2017-09-29 10:11 by kgv
Description There 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]
                 };
                 ^
Revision 2017-09-28 13:04 by kgv
Description There 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 )
     ^~


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker