MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0023072Open CASCADE[OCCT] OCCT:Foundation Classespublic2012-04-05 17:252016-07-22 11:44
Reporterabv 
Assigned Todbv 
PrioritylowSeverityminor 
StatusclosedResolutionfixed 
PlatformWindowsOSVC++ 2008OS Version64 bit
Product Version[OCCT] 6.5.3 
Target Version[OCCT] 6.5.4Fixed in Version[OCCT] 6.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 Fileszip file icon build-653-beta1.log.zip (104,514 bytes) 2012-04-05 17:25

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

-  Notes
(0020644)
dbv (developer)
2012-06-05 12:11

Fixed some warnings

Dear Andrey,
Could you please check it
(0020763)
dbv (developer)
2012-06-22 13:37

Most of the warnings have been eliminated.

Git branch CR23072 is ready to be reviewed.

Dear Andrey,
Please review.
(0020776)
abv (manager)
2012-06-22 19:25

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
(0020782)
dbv (developer)
2012-06-25 11:42

Remarks have been fixed.

Rebased branch has been pushed to the Git branch CR23072_1.

Dear Andrey,
Please review.
(0020784)
abv (manager)
2012-06-25 14:02

Reviewed, please test
(0020801)
aan (developer)
2012-06-27 10:46

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 [^]
(0020967)
Pawel (updater)
2012-07-13 17:28

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.
(0020991)
dbv (developer)
2012-07-16 17:21

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.
(0021036)
abv (manager)
2012-07-18 09:15

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.
(0022001)
abv (manager)
2012-10-30 09:22

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
Timestamp: 2012-06-25 07:31:40
Author: dbv
Details ] Diff ]
0023072: Eliminate compiler warnings (level 3) on Windows / MSVC++
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
2016-07-22 11:44 msv Relationship added parent of 0027703


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker