MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025734Open CASCADE[OCCT] OCCT:Codingpublic2015-01-22 08:242017-05-28 18:16
Reporterabv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 6.9.0Fixed in Version[OCCT] 6.9.0 
Summary0025734: GCC warnings in Android build
DescriptionRegular builds of OCCT on Android show a number of compiler warnings, mostly on unused or uninitialized variables:

AppParCurves_ResolConstraint.gxx:78: variable 'Ok' set but not used [-Wunused-but-set-variable]
AppParCurves_ResolConstraint.gxx:557: variable 'Ok' set but not used [-Wunused-but-set-variable]
IntPatch_Point.lxx:48: 'paraint' may be used uninitialized in this function [-Wmaybe-uninitialized]
TCollection_AsciiString.lxx:116: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
AIS_LocalContext_1.cxx:570: variable 'updMain' set but not used [-Wunused-but-set-variable]
AIS_LocalContext_1.cxx:645: variable 'updMain' set but not used [-Wunused-but-set-variable]
BOPAlgo_BuilderSolid.cxx:483: variable 'aNbFA' set but not used [-Wunused-but-set-variable]
BOPAlgo_BuilderSolid.cxx:573: variable 'aNbHoles' set but not used [-Wunused-but-set-variable]
BOPAlgo_BuilderSolid.cxx:770: variable 'aNbF' set but not used [-Wunused-but-set-variable]
BOPAlgo_PaveFiller_6.cxx:1514: variable 'aType1' set but not used [-Wunused-but-set-variable]
BOPAlgo_PaveFiller_6.cxx:1514: variable 'aType2' set but not used [-Wunused-but-set-variable]
BOPAlgo_PaveFiller_6.cxx:1524: variable 'aTypeC' set but not used [-Wunused-but-set-variable]
BRepFeat_Form.cxx:168: variable 'locmax' set but not used [-Wunused-but-set-variable]
BRepFeat_MakeLinearForm.cxx:318: variable 'Sliding' set but not used [-Wunused-but-set-variable]
BRepOffset_MakeOffset.cxx:913: 'U' may be used uninitialized in this function [-Wmaybe-uninitialized]
BRepOffset_Offset.cxx:565: variable 'VisoDegen' set but not used [-Wunused-but-set-variable]
BSplCLib.cxx:3009: variable 'ErrorCode' set but not used [-Wunused-but-set-variable]
BSplCLib.cxx:3056: variable 'ErrorCode' set but not used [-Wunused-but-set-variable]
Bnd_BoundSortBox.cxx:652: variable '_Xmin' set but not used [-Wunused-but-set-variable]
Bnd_BoundSortBox.cxx:652: variable '_Ymin' set but not used [-Wunused-but-set-variable]
Bnd_BoundSortBox.cxx:652: variable '_Zmin' set but not used [-Wunused-but-set-variable]
BndLib_Add2dCurve.cxx:533: variable 'aTinf' set but not used [-Wunused-but-set-variable]
ChFi3d_Builder_C2.cxx:176: variable 'Stat1' set but not used [-Wunused-but-set-variable]
ChFi3d_Builder_C2.cxx:176: variable 'Stat2' set but not used [-Wunused-but-set-variable]
GeomFill_BSplineCurves.cxx:523: variable 'IsOK' set but not used [-Wunused-but-set-variable]
GeomFill_BezierCurves.cxx:424: variable 'IsOK' set but not used [-Wunused-but-set-variable]
IntWalk_PWalking.cxx:596: variable 'pasMaxSV' set but not used [-Wunused-but-set-variable]
IntWalk_PWalking.cxx:596: variable 'aTmp' set but not used [-Wunused-but-set-variable]
LocOpe_SplitShape.cxx:961: variable 'orfila' set but not used [-Wunused-but-set-variable]
MeshVS_MeshPrsBuilder.cxx:329: variable 'howMany' set but not used [-Wunused-but-set-variable]
OSD_signal.cxx:132: variable 'aSigInfo' set but not used [-Wunused-but-set-variable]
OpenGl_GraduatedTrihedron.cxx:43: 'float getNormal(float*)' defined but not used [-Wunused-function]
OpenGl_GraduatedTrihedron.cxx:103: 'float getDistance2Corner(float*, float*, float, float, float)' defined but not used [-Wunused-function]
OpenGl_GraduatedTrihedron.cxx:108: 'char getFarestCorner(float, float, float, float, float, float, float, float)' defined but not used [-Wunused-function]
OpenGl_GraduatedTrihedron.cxx:156: 'void drawArrow(float, float, float, float, float, float, float, float, float)' defined but not used [-Wunused-function]
OpenGl_View_2.cxx:949: unused variable 'aDataFormat' [-Wunused-variable]
OpenGl_Workspace_5.cxx:258: unused variable 'anRgb' [-Wunused-variable]
RWStepAP214_RWAppliedDocumentReference.cxx:43: variable 'stat2' set but not used [-Wunused-but-set-variable]
RWStepAP214_RWAutoDesignDocumentReference.cxx:43: variable 'stat2' set but not used [-Wunused-but-set-variable]
ShapeProcess_Context.cxx:80: comparison between signed and unsigned integer expressions [-Wsign-compare]
TopOpeBRep_FacesFiller_1.cxx:765: variable 'SIedgeIndex' set but not used [-Wunused-but-set-variable]
TopOpeBRep_FacesFiller_1.cxx:766: variable 'OOparedge' set but not used [-Wunused-but-set-variable]
TopOpeBRep_FacesFiller_1.cxx:806: variable 'Transori' set but not used [-Wunused-but-set-variable]
TopOpeBRep_vprdeg.cxx:1026: variable 'setrest' set but not used [-Wunused-but-set-variable]
TopOpeBRep_vprdeg.cxx:1201: 'par1ondg' may be used uninitialized in this function [-Wmaybe-uninitialized]
TopOpeBRep_vprdeg.cxx:1216: 'par2ondg' may be used uninitialized in this function [-Wmaybe-uninitialized]
Units_Lexicon.cxx:126: comparison between signed and unsigned integer expressions [-Wsign-compare]
Units_UnitsDictionary.cxx:320: comparison between signed and unsigned integer expressions [-Wsign-compare]
Units_UnitsLexicon.cxx:70: comparison between signed and unsigned integer expressions [-Wsign-compare]
gp_GTrsf2d.cxx:137: variable 'value' set but not used [-Wunused-but-set-variable]
Steps To Reproducehttp://jenkins-test-03.nnov.opencascade.com:8080/user/inv/my-views/view/Android/job/mnt-master-master_build_occt_android/99/warnings17Result/ [^]
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships
related to 0025751closedbugmaster Open CASCADE Eliminate GCC warning -Wunused-but-set-variable in gp_GTrsf2d.cxx for Android build 
related to 0025750closedbugmaster Open CASCADE Coding rules - eliminate GCC warning -Wunused-but-set-variable in OSD_signal.cxx for Android build 
related to 0025749assignedabv Open CASCADE Coding, HLRBRep - Eliminate GCC warning -Wswitch in Android build 
related to 0024508closedifv Community Suspect shadowed variable in BRepFeat_MakeLinearForm.cxx 

-  Notes
(0036455)
git (administrator)
2015-01-23 16:54

Branch CR25734 has been created by ski.

SHA-1: 0a78a15ac05951465c5e0d5edbce7504813331ab


Detailed log of new commits:

Author: ski
Date: Fri Jan 23 16:52:11 2015 +0300

    0025734: GCC warnings in Android build
    
    Warnings were fixed.
(0036474)
git (administrator)
2015-01-23 18:36

Branch CR25734 has been updated forcibly by ski.

SHA-1: f8e7bb1e3a88e2c50021f9237682bafd538c6f64
(0036489)
abv (manager)
2015-01-26 06:32

Some remarks:
- AIS_LocalContext_1.cxx: updMain should be just removed in all places, along with macro BUC60774 (it is always defined)
- AppParCurves_ResolConstraint.gxx: there is no need to cast function call to (void): this trick is used only when we need to avoid compiler warning on unused variable (usually function argument) which is used in block wrapped by some #ifdef. The same applies to changes in RW*.cxx and TopOpeBRep_vprdeg.cxx
- HLRBRep_Curve.cxx: please revert the change and create separate issue for warning in that place, as it requires more analysis (e.g. it seems that circle should be handled like ellipse)
- OSD_signal.cxx: this change is not consistent for macros used (and with the current change theSignIgfo becomes non-used insterad). Please register separate issue for this.
- Resource_Manager.cxx: can you explain this change? I see no warning here...
- gp_GTrsf2d.cxx: please register separate issue for that, it needs to be checked for consistency with gp_Trsf* implementation (changed recently)
(0036501)
git (administrator)
2015-01-26 11:28

Branch CR25734 has been updated by ski.

SHA-1: 1eb3d31d1b0e43fff24ad54b38e9d3390718e7f1


Detailed log of new commits:

Author: ski
Date: Mon Jan 26 11:28:07 2015 +0300

    Some changes were reverted or redesigned.

(0036502)
ski (developer)
2015-01-26 11:41

Remarks were applied.
Next issues were created:
0025749 - for case in file HLRBRep_Curve.cxx;
0025750 - for case in file OSD_signal.cxx;
0025751 - for case in file gp_GTrsf2d.cxx;

–°hanged in file Resource_Manager.cxx were made due to
  "TCollection_AsciiString.lxx:116: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]"
warning.

Full text of the warning:

In file included inc/TCollection_AsciiString.hxx:678:0,
                 inc/Resource_Manager.hxx:13,
                 src\Resource\Resource_Manager.cxx:15:
inc/TCollection_AsciiString.lxx: In member function 'void Resource_Manager::Load(TCollection_AsciiString&, TCollection_AsciiString&, Resource_DataMapOfAsciiStringAsciiString&)':
inc/TCollection_AsciiString.lxx:116:3: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
   if (ToIndex > mylength || FromIndex <= 0 || FromIndex > ToIndex ) Standard_OutOfRange::Raise();

Next string in file Resource_Manager.cxx causes this warning:
  aToken2 = Line.SubString(Pos,Line.Length()-1)
(0036503)
ski (developer)
2015-01-26 11:42

Please, review.
(0036640)
abv (manager)
2015-01-26 12:39

Sergey, please remove changes in OpenGl* classes -- they are being redesigned currently and your change will likely conflict with that, and squash your changes in single commit
(0036642)
git (administrator)
2015-01-26 12:48

Branch CR25734 has been updated forcibly by ski.

SHA-1: 45bf7b808bd05561a03784be85cc434e78c42c06
(0036643)
ski (developer)
2015-01-26 12:48

Done.
(0036646)
abv (manager)
2015-01-26 14:08

No remarks, please test
(0036750)
bugmaster (administrator)
2015-01-28 12:48

Report about warning after fix :
http://jenkins-test-03.nnov.opencascade.com:8080/user/inv/my-views/view/Accamulated%20statisticts%20for%20Master%20/job/mnt-master-master_build_occt_android/105/ [^]
(0036787)
mkv (tester)
2015-01-28 18:48

Dear BugMaster,
Branch CR25734 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
45bf7b808bd05561a03784be85cc434e78c42c06

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)

products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)

Regressions/Differences:
http://occt-tests/CR25734-master-occt/Debian60-64/summary.html [^]
http://occt-tests/CR25734-master-occt/Windows-32-VC10/summary.html [^]

Testing cases:
Not needed
(0036853)
git (administrator)
2015-01-29 18:00

Branch CR25734 has been updated by ski.

SHA-1: e62dda387cd548e3abb925d6e54ebbe4bce8eb00


Detailed log of new commits:

Author: ski
Date: Thu Jan 29 18:00:13 2015 +0300

    Fixed wrong re-initialization.

(0036854)
ski (developer)
2015-01-29 18:15

Wrong re-initialization was fixed.

No warnings in file LocOpe_SplitShape.cxx in Android build.

All regressions were manually tested on Windows and Linux platforms - OK.

Please, review.
(0036868)
abv (manager)
2015-01-30 09:28

No remarks, please test
(0036915)
git (administrator)
2015-01-30 16:55

Branch CR25734 has been updated forcibly by mkv.

SHA-1: c3398d3591dfee09105566568752160d5c569da9
(0037014)
mkv (tester)
2015-02-03 13:19

Dear BugMaster,
Branch CR25734 was rebased on current master of occt git-repository.
(0037015)
mkv (tester)
2015-02-03 13:20

Dear BugMaster,
Branch CR25734 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: c3398d3591dfee09105566568752160d5c569da9

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)

products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 369918504 / 370076844
Total CPU difference: 52420.93000000003 / 49863.81000000002
products component :
Total MEMORY difference: 110489836 / 110404960
Total CPU difference: 17314.209999999995 / 15808.789999999974

Testing on Windows:
occt component :
Total MEMORY difference: 276110836 / 276284192
Total CPU difference: 36733.78125 / 36894.109375
products component :
Total MEMORY difference: 72544208 / 71401072
Total CPU difference: 10099.71875 / 11731.96875

There are no differences in images found by testdiff.
(0038571)
git (administrator)
2015-03-18 13:36

Branch CR25734 has been deleted by inv.

SHA-1: c3398d3591dfee09105566568752160d5c569da9

- Related Changesets
occt: master bcf50875
Timestamp: 2015-02-05 11:23:17
Author: ski
Committer: bugmaster
Details ] Diff ]
0025734: GCC warnings in Android build

Warnings were fixed.

Fixed wrong re-initialization.
mod - src/AIS/AIS_LocalContext_1.cxx Diff ] File ]
mod - src/AppParCurves/AppParCurves_ResolConstraint.gxx Diff ] File ]
mod - src/Bnd/Bnd_BoundSortBox.cxx Diff ] File ]
mod - src/BndLib/BndLib_Add2dCurve.cxx Diff ] File ]
mod - src/BOPAlgo/BOPAlgo_BuilderSolid.cxx Diff ] File ]
mod - src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx Diff ] File ]
mod - src/BRepFeat/BRepFeat_Form.cxx Diff ] File ]
mod - src/BRepFeat/BRepFeat_MakeLinearForm.cxx Diff ] File ]
mod - src/BRepMesh/BRepMesh_FastDiscret.hxx Diff ] File ]
mod - src/BRepOffset/BRepOffset_MakeOffset.cxx Diff ] File ]
mod - src/BRepOffset/BRepOffset_Offset.cxx Diff ] File ]
mod - src/BSplCLib/BSplCLib.cxx Diff ] File ]
mod - src/ChFi3d/ChFi3d_Builder_C2.cxx Diff ] File ]
mod - src/GeomFill/GeomFill_BezierCurves.cxx Diff ] File ]
mod - src/GeomFill/GeomFill_BSplineCurves.cxx Diff ] File ]
mod - src/IntPatch/IntPatch_ImpImpIntersection_0.gxx Diff ] File ]
mod - src/IntTools/IntTools_FaceFace.cxx Diff ] File ]
mod - src/IntWalk/IntWalk_PWalking.cxx Diff ] File ]
mod - src/LocOpe/LocOpe_SplitShape.cxx Diff ] File ]
mod - src/MeshVS/MeshVS_MeshPrsBuilder.cxx Diff ] File ]
mod - src/Resource/Resource_Manager.cxx Diff ] File ]
mod - src/RWStepAP214/RWStepAP214_RWAppliedDocumentReference.cxx Diff ] File ]
mod - src/RWStepAP214/RWStepAP214_RWAutoDesignDocumentReference.cxx Diff ] File ]
mod - src/ShapeProcess/ShapeProcess_Context.cxx Diff ] File ]
mod - src/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx Diff ] File ]
mod - src/TopOpeBRep/TopOpeBRep_vprdeg.cxx Diff ] File ]
mod - src/Units/Units_Lexicon.cxx Diff ] File ]
mod - src/Units/Units_UnitsDictionary.cxx Diff ] File ]
mod - src/Units/Units_UnitsLexicon.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2015-01-22 08:24 abv New Issue
2015-01-22 08:24 abv Assigned To => kgv
2015-01-22 08:24 abv Assigned To kgv => ski
2015-01-22 08:24 abv Status new => assigned
2015-01-23 16:54 git Note Added: 0036455
2015-01-23 18:36 git Note Added: 0036474
2015-01-26 06:32 abv Note Added: 0036489
2015-01-26 11:28 git Note Added: 0036501
2015-01-26 11:41 ski Note Added: 0036502
2015-01-26 11:42 ski Note Added: 0036503
2015-01-26 11:42 ski Assigned To ski => abv
2015-01-26 11:42 ski Status assigned => resolved
2015-01-26 12:39 abv Note Added: 0036640
2015-01-26 12:40 abv Relationship added related to 0025751
2015-01-26 12:40 abv Relationship added related to 0025750
2015-01-26 12:40 abv Relationship added related to 0025749
2015-01-26 12:48 git Note Added: 0036642
2015-01-26 12:48 ski Note Added: 0036643
2015-01-26 14:08 abv Note Added: 0036646
2015-01-26 14:08 abv Assigned To abv => bugmaster
2015-01-26 14:08 abv Status resolved => reviewed
2015-01-28 12:46 bugmaster Assigned To bugmaster => mkv
2015-01-28 12:48 bugmaster Note Added: 0036750
2015-01-28 18:48 mkv Note Added: 0036787
2015-01-28 18:48 mkv Assigned To mkv => ski
2015-01-28 18:48 mkv Status reviewed => assigned
2015-01-29 18:00 git Note Added: 0036853
2015-01-29 18:15 ski Note Added: 0036854
2015-01-29 18:15 ski Assigned To ski => abv
2015-01-29 18:15 ski Status assigned => resolved
2015-01-30 09:28 abv Note Added: 0036868
2015-01-30 09:28 abv Assigned To abv => bugmaster
2015-01-30 09:28 abv Status resolved => reviewed
2015-01-30 14:31 mkv Assigned To bugmaster => mkv
2015-01-30 16:55 git Note Added: 0036915
2015-02-03 13:19 mkv Note Added: 0037014
2015-02-03 13:20 mkv Note Added: 0037015
2015-02-03 13:20 mkv Test case number => Not needed
2015-02-03 13:20 mkv Assigned To mkv => bugmaster
2015-02-03 13:20 mkv Status reviewed => tested
2015-02-06 15:38 bugmaster Changeset attached => occt master bcf50875
2015-02-06 15:38 bugmaster Status tested => verified
2015-02-06 15:38 bugmaster Resolution open => fixed
2015-03-18 13:36 git Note Added: 0038571
2015-05-14 15:29 aiv Status verified => closed
2015-05-14 15:32 aiv Fixed in Version => 6.9.0
2017-05-28 18:16 abv Relationship added related to 0024508


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker