View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0029152 | Open CASCADE | OCCT:Coding | public | 2017-09-28 13:04 | 2018-06-29 21:19 |
Reporter | kgv | Assigned To | bugmaster | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 7.2.0 | ||||
Target Version | 7.3.0 | Fixed in Version | 7.3.0 | ||
Summary | 0029152: Coding Rules - eliminate GCC compiler warnings -Wmisleading-indentation when using MinGW | ||||
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] }; ^ | ||||
Tags | No tags attached. | ||||
Test case number | Not required | ||||
related to | 0029151 | closed | Coding Rules - eliminate GCC compiler warnings -Wimplicit-fallthrough |
|
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 |
|
Branch CR29152 has been updated forcibly by kgv. SHA-1: 6e31163292ec6b5d5e475d6cb21f175b00ccfd3c |
|
Patch is ready for review. http://jenkins-test-10.nnov.opencascade.com/view/CR29152-master-KGV/ |
|
How can I review it? These files are completely rewritten, and there is no description of the actual changes made! |
|
The warning is generated for badly formatted code, hence patch applies reformatting. |
|
Branch CR29152 has been updated forcibly by kgv. SHA-1: e43f2ed0959d1e7002c02ef0f7e693b5eda9eed5 |
|
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. |
|
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. |
|
Branch CR29152_1 has been updated forcibly by abv. SHA-1: 18002ba46b1f521758fc8d97984996b96eed7073 |
|
Branch CR29152_1 has been updated forcibly by abv. SHA-1: fcaee9b15b80be3e1ce456bc5f145734068723ce |
|
Reviewed with some additional corrections, see branch CR29152_1 |
|
Branch CR29152_1 has been updated forcibly by abv. SHA-1: 0e7bc01a3198b0db56f1ca34d27200ecef234ca2 |
|
Tested in framework of testing issue 29170 |
|
Branch CR29152 has been deleted by kgv. SHA-1: e43f2ed0959d1e7002c02ef0f7e693b5eda9eed5 |
|
Branch CR29152_1 has been deleted by kgv. SHA-1: 0e7bc01a3198b0db56f1ca34d27200ecef234ca2 |
occt: master cda06ac0 2017-09-28 18:29:22 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. |
Affected Issues 0029152 |
|
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 |
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 | |
2017-09-29 11:51 |
|
Note Added: 0070966 | |
2017-09-29 11:51 |
|
Assigned To | abv => kgv |
2017-09-29 11:51 |
|
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 |
|
Note Added: 0071099 | |
2017-10-01 21:11 |
|
Assigned To | abv => bugmaster |
2017-10-01 21:11 |
|
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 |
|
Target Version | 7.4.0 => 7.3.0 |
2018-06-29 21:15 |
|
Fixed in Version | => 7.3.0 |
2018-06-29 21:19 |
|
Status | verified => closed |