View Issue Details

IDProjectCategoryView StatusLast Update
0023072Open CASCADEOCCT:Foundation Classespublic2016-07-22 11:44
ReporterabvAssigned Todbv 
PrioritylowSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2008 
Product Version6.5.3 
Target Version6.5.4Fixed in Version6.5.4 
Summary0023072: Eliminate compiler warnings (level 3) on Windows / MSVC++
DescriptionCurrently (OCCT 6.5.3 beta1) building OCCT on Windows under MSVC compiler gives about 300 warning messages per configuration (with default warning level 3). Most of these warnings should be easy to eliminate, and this is worth doing.

The attached archive contains complete log of build in 4 configurations (Debug and Release, 32- and 64-bit) and cumulative list of warnings at the end.
TagsNo tags attached.
Test case numberNot needed

Attached Files

  • build-653-beta1.log.zip (104,514 bytes)

Relationships

parent of 0023498 closedabv Open CASCADE Comparison always true in Units_Lexicon::Creates() 
related to 0023332 closedPawel Community Expression 'anIndex < 0' is always false. Unsigned type value is never < 0. in Vrmldata_Geometry.cxx 
related to 0023346 closedPawel Community MSVC++ Error C2664: 'AIS_InteractiveObject::PolygonOffsets': conversion from 'Standard_Real' in 'Standard_ShortReal &' 
related to 0023348 closedPawel Community Expression 'ii >= 0' is always true. Unsigned type value is always >= 0. 

Activities

abv

2012-04-05 17:25

manager  

build-653-beta1.log.zip (104,514 bytes)

dbv

2012-06-05 12:11

developer   ~0020644

Fixed some warnings

Dear Andrey,
Could you please check it

dbv

2012-06-22 13:37

developer   ~0020763

Most of the warnings have been eliminated.

Git branch CR23072 is ready to be reviewed.

Dear Andrey,
Please review.

abv

2012-06-22 19:25

manager   ~0020776

The change in XSControl_TransferReader.cxx seems to be ineffective (the cast is applies to first member of the expression only, while logically it should apply to the whole), please check. The same in NCollection/NCollection_BaseVector.cxx. In TopOpeBRepDS_Dumper.cxx, please use plain integer instead of taking strlen from string literal (use comment to explain the intent).

Also, please rebase on current master

dbv

2012-06-25 11:42

developer   ~0020782

Remarks have been fixed.

Rebased branch has been pushed to the Git branch CR23072_1.

Dear Andrey,
Please review.

abv

2012-06-25 14:02

manager   ~0020784

Reviewed, please test

aan

2012-06-27 10:46

developer   ~0020801

Dear BugMaster,
The workbenches
KAS:dev:aan-23072-occt (GIT branch CR23072_1)
KAS:dev:aan-23072-products (GIT master)
were compiled on Linux platform and tested.

Regression:
Not detected

Improvements:
Not detected

Testing case:
Not needed

See results in /QADisk/occttests/results/KAS/dev/aan-23072-products_26062012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120525-opt_25052012/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://doc/doku.php?id=occt:certification

Pawel

2012-07-13 17:28

updater   ~0020967

In Units_Lexicon.cxx, Units_Lexicon::Creates() comparing 'i' against 0 (lower, greater or equal) in lines 115, 117, 119, 122

    while( i>=0 && ( chain[i] == ' ' || !chain[i] ))
      chain[i--]=0;
    if(i<0) continue;
    i=9;
    while( i>=0 && ( oper [i] == ' ' || !oper [i] ))
      oper[i--]=0;
    i=29;
    while( i>=0 && ( coeff[i] == ' ' || !coeff[i] ))
      coeff[i--]=0;

is either always 'true' (line 119, 122) or 'false' (lines 115, 117) because 'i' was declared to be of type 'Standard_Size' and so is unsigned. As I'm not sure about the functionality of the method I can't say whether this is critical or not.

Consider changing the type of 'i' back to 'Standard_Integer' (although it produces a warning) or changing the logic in the method.

dbv

2012-07-16 17:21

developer   ~0020991

Dear Pawel,

Thank you for the remark.

Char arrays in Units_Lexicon::Creates were replaced with TCollection_AsciiString.

Fix was pushed to the git branch CR23072_1

Dear Andrey,
Please review.

abv

2012-07-18 09:15

manager   ~0021036

The fix might be dangerous since TCollection_AsciiString::RealValue() can raise exception if the string does not contain a number, and Units package sometimes is used in places where exceptions are not expected. Apart of this, the whole code looks ugly: using sscanf() to get a char from the string looks like overkill, variable fr is not used at all, etc. Also, I suggest we check that we have a good systematic test for the Units package before integration of this fix.

abv

2012-10-30 09:22

manager   ~0022001

I have separated the problem reported by Pawel in 0023072:0020967 to separate issue 0023498, thus this one can be switched to verified

Related Changesets

occt: master 60be1f9b

2012-06-25 07:31:40

dbv

Details Diff
0023072: Eliminate compiler warnings (level 3) on Windows / MSVC++ Affected Issues
0023072
mod - src/AIS/AIS_InteractiveContext.cdl Diff File
mod - src/AIS/AIS_InteractiveContext_3.cxx Diff File
mod - src/AIS/AIS_InteractiveObject.cdl Diff File
mod - src/AIS/AIS_InteractiveObject.cxx Diff File
mod - src/AIS/AIS_TexturedShape.cxx Diff File
mod - src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx Diff File
mod - src/BinTools/BinTools_ShapeSet.cxx Diff File
mod - src/CGM/cgmobin.c Diff File
mod - src/DDF/DDF_IOStream.cxx Diff File
mod - src/Draw/Draw_Interpretor.cxx Diff File
mod - src/DrawTrSurf/DrawTrSurf.cxx Diff File
mod - src/DrawTrSurf/DrawTrSurf_Point.cxx Diff File
mod - src/GeomTools/GeomTools_Curve2dSet.cxx Diff File
mod - src/GeomTools/GeomTools_CurveSet.cxx Diff File
mod - src/GeomTools/GeomTools_SurfaceSet.cxx Diff File
mod - src/Graphic3d/Graphic3d_AspectFillArea3d.cdl Diff File
mod - src/Graphic3d/Graphic3d_AspectFillArea3d.cxx Diff File
mod - src/Graphic3d/Graphic3d_Group_8.cxx Diff File
mod - src/Graphic3d/Graphic3d_Structure.cxx Diff File
mod - src/IFSelect/IFSelect_Editor.cxx Diff File
mod - src/Interface/Interface_MSG.cxx Diff File
mod - src/LDOM/LDOMBasicString.cxx Diff File
mod - src/LDOM/LDOM_XmlReader.cxx Diff File
mod - src/LDOM/LDOM_XmlWriter.cxx Diff File
mod - src/Message/Message_Msg.cxx Diff File
mod - src/NCollection/NCollection_BaseVector.cxx Diff File
mod - src/NIS/NIS_InteractiveObject.hxx Diff File
mod - src/OpenGl/OpenGl_Display_1.cxx Diff File
mod - src/OSD/OSD_Host.cxx Diff File
mod - src/OSD/OSD_SystemFont.cxx Diff File
mod - src/PCollection/PCollection_HAsciiString.cxx Diff File
mod - src/PCollection/PCollection_HExtendedString.cxx Diff File
mod - src/Prs2d/Prs2d_Diameter.cxx Diff File
mod - src/StepData/StepData_StepDumper.cxx Diff File
mod - src/StepData/StepData_StepWriter.cxx Diff File
mod - src/TopOpeBRepDS/TopOpeBRepDS_Dumper.cxx Diff File
mod - src/TopTools/TopTools_LocationSet.cxx Diff File
mod - src/TopTools/TopTools_ShapeSet.cxx Diff File
mod - src/Units/Units_Lexicon.cxx Diff File
mod - src/Units/Units_Sentence.cxx Diff File
mod - src/Units/Units_UnitsDictionary.cxx Diff File
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx Diff File
mod - src/VrmlData/VrmlData_Geometry.cxx Diff File
mod - src/VrmlData/VrmlData_Scene.cxx Diff File
mod - src/WNT/WNT_ImageManager.cxx Diff File
mod - src/XSControl/XSControl_TransferReader.cxx Diff File
mod - src/XSDRAW/XSDRAW.cxx Diff File

Issue History

Date Modified Username Field Change
2012-04-05 17:25 abv New Issue
2012-04-05 17:25 abv Assigned To => dbv
2012-04-05 17:25 abv File Added: build-653-beta1.log.zip
2012-04-05 17:25 abv Status new => assigned
2012-06-05 12:11 dbv Note Added: 0020644
2012-06-05 12:11 dbv Assigned To dbv => abv
2012-06-22 13:37 dbv Note Added: 0020763
2012-06-22 13:37 dbv Status assigned => resolved
2012-06-22 19:25 abv Note Added: 0020776
2012-06-22 19:25 abv Assigned To abv => dbv
2012-06-22 19:25 abv Status resolved => assigned
2012-06-25 11:42 dbv Note Added: 0020782
2012-06-25 11:42 dbv Assigned To dbv => abv
2012-06-25 11:42 dbv Status assigned => resolved
2012-06-25 14:02 abv Note Added: 0020784
2012-06-25 14:02 abv Assigned To abv => bugmaster
2012-06-25 14:02 abv Status resolved => reviewed
2012-06-25 15:30 mkv Assigned To bugmaster => aan
2012-06-27 10:40 aan Test case number => Not needed
2012-06-27 10:46 aan Note Added: 0020801
2012-06-27 10:47 aan Assigned To aan => bugmaster
2012-06-27 10:47 aan Status reviewed => tested
2012-07-10 14:33 dbv Changeset attached => occt master 60be1f9b
2012-07-10 14:35 dbv Assigned To bugmaster => dbv
2012-07-10 14:35 dbv Status tested => verified
2012-07-10 14:35 dbv Resolution open => fixed
2012-07-13 17:28 Pawel Note Added: 0020967
2012-07-13 17:28 Pawel Status verified => feedback
2012-07-13 17:28 Pawel Resolution fixed => reopened
2012-07-16 17:18 dbv Status feedback => assigned
2012-07-16 17:21 dbv Note Added: 0020991
2012-07-16 17:21 dbv Assigned To dbv => abv
2012-07-16 17:21 dbv Status assigned => resolved
2012-07-18 09:15 abv Note Added: 0021036
2012-07-18 09:15 abv Status resolved => assigned
2012-07-20 15:00 Pawel Relationship added related to 0023332
2012-07-25 18:59 Pawel Relationship added related to 0023346
2012-07-25 19:48 Pawel Relationship added related to 0023348
2012-10-30 07:30 abv Relationship added parent of 0023498
2012-10-30 09:22 abv Note Added: 0022001
2012-10-30 09:22 abv Assigned To abv => bugmaster
2012-10-30 09:22 abv Status assigned => feedback
2012-10-30 10:23 bugmaster Status feedback => tested
2012-10-30 10:25 bugmaster Status tested => verified
2012-10-30 10:25 bugmaster Resolution reopened => fixed
2012-11-16 13:13 bugmaster Fixed in Version => 6.5.4
2012-11-16 13:18 bugmaster Status verified => closed