Archived issue #0024096

Eliminate compiler warning C4505 in MSVC++ with warning level 4

Open CASCADEOCCT:Codingclosed7 public notes

Search issues

Description

When compiling OCCT 6.6.0 with warning level set to 4, MSVC 2008 compiler produces many warnings c4505: unreferenced local function has been removed.

Public activity

7 archived notes

Participants are labeled by their role within this record.

01Commenter 1
Dear abv,
Please, review the changes of branch CR24096

02Commenter 2
In BRepBlend_RstRstLineBuilder.cxx, BRepBlend_SurfRstLineBuilder.cxx, BRepFill_CompatibleWires.cxx, Bisector_BisecPC.cxx, HLRBRep_EdgeIList.cxx, IntTools_FaceFace.cxx, ProjLib_ProjectedCurve.cxx, ShapeFix_Solid.cxx, TNaming_Name.cxx, TopOpeBRep_vprdeg.cxx, TopOpeBRepTool_PURGE.cxx, TopOpeBRepTool_faulty.cxx, the code calling removed functions is still present (commented out or disabed by #ifdef 0), this code becomes yet more useless than before.

Please either clean up this code along with the removed functions, or recover deleted functions and calling code together putting it into appropriate #ifdef so that it can be activated by defining specific macro. Consult the experts for whether the code being removed is potentially useful or not.
03Commenter 3
Dear abv,
I've made the necessary cleanup and restored some useful functions.
Please, review.
04Commenter 4
Please use specific macros (with own name in each function, e.g. DEBUG_DUMP_WLINE etc.) instead of DEB for disabled functions. Note that DEB macro is defined in Debug configurations and thus the code which should be disabled will actually be enabled in Debug.
05Commenter 5
Dear abv,
I've made the necessary corrections in the code and rebased the branch onto current master.
Please, review.
06Commenter 6
No remarks, please test
07Commenter 7
Dear Commenter 1,

Branch CR24096 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
[revision removed]

Number of compiler warnings:

occt component :
Linux: 918 (947 on master)
Windows: 862 (891 on master)

products component :
Linux: 188 (188 on master)
Windows: 287 (287 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 364059844 / 363686308
Total CPU difference: 43029.2700000007 / 43423.52000000051

Testing on Windows:
Total MEMORY difference: 424394440 / 424221448
Total CPU difference: 38173.9375 / 53402.53125

There are not differences in images found by testdiff.

Related records