View Issue Details

IDProjectCategoryView StatusLast Update
0029152Open CASCADEOCCT:Codingpublic2018-06-29 21:19
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version7.2.0 
Target Version7.3.0Fixed in Version7.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

Relationships

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

Activities

git

2017-09-28 21:30

administrator   ~0070947

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

git

2017-09-28 21:48

administrator   ~0070948

Branch CR29152 has been updated forcibly by kgv.

SHA-1: 6e31163292ec6b5d5e475d6cb21f175b00ccfd3c

kgv

2017-09-29 01:20

developer   ~0070951

Patch is ready for review.
http://jenkins-test-10.nnov.opencascade.com/view/CR29152-master-KGV/

abv

2017-09-29 11:51

manager   ~0070966

How can I review it? These files are completely rewritten, and there is no description of the actual changes made!

kgv

2017-09-29 11:53

developer   ~0070967

The warning is generated for badly formatted code, hence patch applies reformatting.

git

2017-09-29 12:07

administrator   ~0070968

Branch CR29152 has been updated forcibly by kgv.

SHA-1: e43f2ed0959d1e7002c02ef0f7e693b5eda9eed5

kgv

2017-09-29 12:08

developer   ~0070969

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.

git

2017-09-29 20:19

administrator   ~0071081

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.

git

2017-10-01 21:08

administrator   ~0071097

Branch CR29152_1 has been updated forcibly by abv.

SHA-1: 18002ba46b1f521758fc8d97984996b96eed7073

git

2017-10-01 21:10

administrator   ~0071098

Branch CR29152_1 has been updated forcibly by abv.

SHA-1: fcaee9b15b80be3e1ce456bc5f145734068723ce

abv

2017-10-01 21:11

manager   ~0071099

Reviewed with some additional corrections, see branch CR29152_1

git

2017-10-01 22:06

administrator   ~0071102

Branch CR29152_1 has been updated forcibly by abv.

SHA-1: 0e7bc01a3198b0db56f1ca34d27200ecef234ca2

bugmaster

2017-10-03 09:41

administrator   ~0071136

Tested in framework of testing issue 29170

git

2017-10-14 12:20

administrator   ~0071467

Branch CR29152 has been deleted by kgv.

SHA-1: e43f2ed0959d1e7002c02ef0f7e693b5eda9eed5

git

2017-10-14 12:20

administrator   ~0071468

Branch CR29152_1 has been deleted by kgv.

SHA-1: 0e7bc01a3198b0db56f1ca34d27200ecef234ca2

Related Changesets

occt: master cda06ac0

2017-09-28 18:29:22

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.
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

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
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 aiv Target Version 7.4.0 => 7.3.0
2018-06-29 21:15 aiv Fixed in Version => 7.3.0
2018-06-29 21:19 aiv Status verified => closed