View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023072 | Open CASCADE | OCCT:Foundation Classes | public | 2012-04-05 17:25 | 2016-07-22 11:44 |
Reporter | Assigned To | ||||
Priority | low | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2008 | ||
Product Version | 6.5.3 | ||||
Target Version | 6.5.4 | Fixed in Version | 6.5.4 | ||
Summary | 0023072: Eliminate compiler warnings (level 3) on Windows / MSVC++ | ||||
Description | Currently (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. | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
parent of | 0023498 | closed | Open CASCADE | Comparison always true in Units_Lexicon::Creates() | |
related to | 0023332 | closed | Pawel | Community | Expression 'anIndex < 0' is always false. Unsigned type value is never < 0. in Vrmldata_Geometry.cxx |
related to | 0023346 | closed | Pawel | Community | MSVC++ Error C2664: 'AIS_InteractiveObject::PolygonOffsets': conversion from 'Standard_Real' in 'Standard_ShortReal &' |
related to | 0023348 | closed | Pawel | Community | Expression 'ii >= 0' is always true. Unsigned type value is always >= 0. |
2012-04-05 17:25 manager |
build-653-beta1.log.zip (104,514 bytes) |
|
Fixed some warnings Dear Andrey, Could you please check it |
|
Most of the warnings have been eliminated. Git branch CR23072 is ready to be reviewed. Dear Andrey, Please review. |
|
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 |
|
Remarks have been fixed. Rebased branch has been pushed to the Git branch CR23072_1. Dear Andrey, Please review. |
|
Reviewed, please test |
|
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 |
|
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. |
|
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. |
|
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. |
|
I have separated the problem reported by Pawel in 0023072:0020967 to separate issue 0023498, thus this one can be switched to verified |
occt: master 60be1f9b 2012-06-25 07:31:40
|
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 |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-04-05 17:25 |
|
New Issue | |
2012-04-05 17:25 |
|
Assigned To | => dbv |
2012-04-05 17:25 |
|
File Added: build-653-beta1.log.zip | |
2012-04-05 17:25 |
|
Status | new => assigned |
2012-06-05 12:11 |
|
Note Added: 0020644 | |
2012-06-05 12:11 |
|
Assigned To | dbv => abv |
2012-06-22 13:37 |
|
Note Added: 0020763 | |
2012-06-22 13:37 |
|
Status | assigned => resolved |
2012-06-22 19:25 |
|
Note Added: 0020776 | |
2012-06-22 19:25 |
|
Assigned To | abv => dbv |
2012-06-22 19:25 |
|
Status | resolved => assigned |
2012-06-25 11:42 |
|
Note Added: 0020782 | |
2012-06-25 11:42 |
|
Assigned To | dbv => abv |
2012-06-25 11:42 |
|
Status | assigned => resolved |
2012-06-25 14:02 |
|
Note Added: 0020784 | |
2012-06-25 14:02 |
|
Assigned To | abv => bugmaster |
2012-06-25 14:02 |
|
Status | resolved => reviewed |
2012-06-25 15:30 |
|
Assigned To | bugmaster => aan |
2012-06-27 10:40 |
|
Test case number | => Not needed |
2012-06-27 10:46 |
|
Note Added: 0020801 | |
2012-06-27 10:47 |
|
Assigned To | aan => bugmaster |
2012-06-27 10:47 |
|
Status | reviewed => tested |
2012-07-10 14:33 |
|
Changeset attached | => occt master 60be1f9b |
2012-07-10 14:35 |
|
Assigned To | bugmaster => dbv |
2012-07-10 14:35 |
|
Status | tested => verified |
2012-07-10 14:35 |
|
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 |
|
Status | feedback => assigned |
2012-07-16 17:21 |
|
Note Added: 0020991 | |
2012-07-16 17:21 |
|
Assigned To | dbv => abv |
2012-07-16 17:21 |
|
Status | assigned => resolved |
2012-07-18 09:15 |
|
Note Added: 0021036 | |
2012-07-18 09:15 |
|
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 |
|
Relationship added | parent of 0023498 |
2012-10-30 09:22 |
|
Note Added: 0022001 | |
2012-10-30 09:22 |
|
Assigned To | abv => bugmaster |
2012-10-30 09:22 |
|
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 |