View Issue Details

IDProjectCategoryView StatusLast Update
0024567CommunityOCCT:Codingpublic2016-04-20 15:51
ReporterHugues Delorme Assigned Toabv 
PrioritylowSeverityintegration request 
Status closedResolutionfixed 
PlatformLinux 
Product Version6.7.0 
Target Version7.0.0Fixed in Version7.0.0 
Summary0024567: Coding rules - eliminate GCC warning -Wignored-qualifiers
DescriptionWhen compiling code using OpenCascade, GCC reports many warnings for member functions returning const values.

Example for TCollection_ExtendedString::ToExtString() :
  warning: type qualifiers ignored on function return type [-Wignored-qualifiers]

Code example where warning occurs:
  Standard_EXPORT static const Standard_CString MagicNumber();
  Standard_EXPORT const Standard_ExtString ToExtString() const;


Filtered log:
/occt/inc/../src/TCollection/TCollection_ExtendedString.hxx|276|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/FSD/FSD_BinaryFile.hxx|319|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/FSD/FSD_BinaryFile.cxx|153|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/FSD/FSD_CmpFile.hxx|288|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/FSD/FSD_CmpFile.cxx|166|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/TCollection/TCollection_HExtendedString.hxx|166|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/FSD/FSD_File.hxx|306|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/FSD/FSD_File.cxx|157|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/NCollection/NCollection_AccAllocator.hxx|82|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/NCollection/NCollection_AccAllocator.hxx|94|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/NCollection/NCollection_AccAllocator.hxx|96|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/TCollection/TCollection_ExtendedString.cxx|777|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/TCollection/TCollection_HExtendedString.cxx|259|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/BRepLib/BRepLib_FuseEdges.hxx|88|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/BRepLib/BRepLib_FuseEdges.cxx|311|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/BRepMesh/BRepMesh_VertexInspector.hxx|116|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/BRepFill/BRepFill_Evolved.cxx|129|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.hxx|85|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.cxx|166|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.hxx|68|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.cxx|70|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx|59|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx|62|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx|65|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx|77|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx|80|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx|83|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx|86|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx|166|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx|172|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx|175|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx|184|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx|193|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Graphic3d/Graphic3d_ZLayerSettings.hxx|42|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/SelectMgr/SelectMgr_Selection.hxx|127|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/PrsMgr/PrsMgr_PresentableObject.hxx|185|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/PrsMgr/PrsMgr_PresentableObject.hxx|197|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/PrsMgr/PrsMgr_PresentableObject.hxx|200|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/PrsMgr/PrsMgr_PresentableObject.lxx|45|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/PrsMgr/PrsMgr_PresentableObject.lxx|50|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/AIS/AIS_Dimension.hxx|252|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Select3D/Select3D_PointData.hxx|80|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/AIS/AIS_Dimension.cxx|144|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/PrsMgr/PrsMgr_PresentableObject.cxx|520|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/SelectMgr/SelectMgr_Selection.cxx|125|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/OpenGl/OpenGl_AspectFace.hxx|93|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/OpenGl/OpenGl_ShaderStates.hxx|202|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/OpenGl/OpenGl_Texture.hxx|258|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/OpenGl/OpenGl_GraphicDriver.hxx|237|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/OpenGl/OpenGl_PrimitiveArray.hxx|84|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/OpenGl/OpenGl_Structure.hxx|160|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/OpenGl/OpenGl_Layer.hxx|66|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/OpenGl/OpenGl_SceneGeometry.hxx|180|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/OpenGl/OpenGl_Texture.cxx|80|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/TNaming/TNaming_Name.hxx|79|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/TNaming/TNaming_Name.lxx|23|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/IGESData/IGESData_ParamReader.hxx|113|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/IGESData/IGESData_ParamReader.cxx|176|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/STEPConstruct/STEPConstruct_ExternRefs.hxx|77|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/STEPConstruct/STEPConstruct_ExternRefs.cxx|313|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Draw/Draw_View.hxx|80|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Draw/Draw_View.hxx|86|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Draw/Draw_View.hxx|92|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Draw/Draw_View.hxx|104|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Draw/Draw_View.hxx|118|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/Draw/Draw_View.hxx|124|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/TestTopOpeTools/TestTopOpeTools_Trace.hxx|119|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/TestTopOpeTools/TestTopOpeTools_Trace.hxx|120|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/TestTopOpeTools/TestTopOpeTools_Trace.cxx|161|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/TestTopOpeTools/TestTopOpeTools_Trace.cxx|164|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/inc/../src/DDF/DDF_IOStream.hxx|213|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
/occt/src/DDF/DDF_IOStream.cxx|165|warning: type qualifiers ignored on function return type [-Wignored-qualifiers]|
Steps To ReproduceN/A
TagsNo tags attached.
Test case number

Activities

abv

2014-01-24 09:19

manager   ~0027633

Hugues, thank you for highlighting the problem. Actually we do not see it, likely because we do not use (yet) option -Wextra.

Are you going to provide the fix? If not, please put here the list of errors of this kind being reported, so that someone having no access to Linux/GXX could try to make a fix.

Hugues Delorme

2014-01-24 12:29

reporter   ~0027637

abv,

  I can provide a fix for the occurences I see.

git

2015-11-07 21:53

administrator   ~0047912

Branch CR24567 has been created by abv.

SHA-1: 487bf1ceaaf4a187e2bacb6cca547b1e3fcc3a9b


Detailed log of new commits:

Author: abv
Date: Sat Nov 7 21:19:03 2015 +0300

    0024567: Coding rules - eliminate GCC warning -Wignored-qualifiers
    
    Redundant const qualifiers of return types of functions returning values are removed

abv

2015-11-07 23:46

manager   ~0047915

Fix pushed to CR24567, please review

kgv

2015-11-08 10:29

developer   ~0047920

Please check compilation, testing is not needed.
Note that patch is based on branch for 0026843.

git

2016-04-17 14:23

administrator   ~0053138

Branch CR24567 has been deleted by kgv.

SHA-1: 487bf1ceaaf4a187e2bacb6cca547b1e3fcc3a9b

Related Changesets

occt: master 487bf1ce

2015-11-07 18:19:03

abv


Committer: abv Details Diff
0024567: Coding rules - eliminate GCC warning -Wignored-qualifiers

Redundant const qualifiers of return types of functions returning values are removed
Affected Issues
0024567
mod - src/AIS/AIS_Dimension.cxx Diff File
mod - src/AIS/AIS_Dimension.hxx Diff File
mod - src/BRepFill/BRepFill_Evolved.cxx Diff File
mod - src/BRepLib/BRepLib_FuseEdges.cxx Diff File
mod - src/BRepLib/BRepLib_FuseEdges.hxx Diff File
mod - src/BRepMesh/BRepMesh_VertexInspector.hxx Diff File
mod - src/DDF/DDF_IOStream.cxx Diff File
mod - src/DDF/DDF_IOStream.hxx Diff File
mod - src/Draw/Draw_View.hxx Diff File
mod - src/FSD/FSD_BinaryFile.cxx Diff File
mod - src/FSD/FSD_BinaryFile.hxx Diff File
mod - src/FSD/FSD_CmpFile.cxx Diff File
mod - src/FSD/FSD_CmpFile.hxx Diff File
mod - src/FSD/FSD_File.cxx Diff File
mod - src/FSD/FSD_File.hxx Diff File
mod - src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx Diff File
mod - src/Graphic3d/Graphic3d_ZLayerSettings.hxx Diff File
mod - src/IGESData/IGESData_ParamReader.cxx Diff File
mod - src/IGESData/IGESData_ParamReader.hxx Diff File
mod - src/NCollection/NCollection_AccAllocator.hxx Diff File
mod - src/OpenGl/OpenGl_AspectFace.hxx Diff File
mod - src/OpenGl/OpenGl_GraphicDriver.hxx Diff File
mod - src/OpenGl/OpenGl_Layer.hxx Diff File
mod - src/OpenGl/OpenGl_PrimitiveArray.hxx Diff File
mod - src/OpenGl/OpenGl_SceneGeometry.hxx Diff File
mod - src/OpenGl/OpenGl_ShaderStates.hxx Diff File
mod - src/OpenGl/OpenGl_Structure.hxx Diff File
mod - src/OpenGl/OpenGl_Texture.cxx Diff File
mod - src/OpenGl/OpenGl_Texture.hxx Diff File
mod - src/PrsMgr/PrsMgr_PresentableObject.cxx Diff File
mod - src/PrsMgr/PrsMgr_PresentableObject.hxx Diff File
mod - src/PrsMgr/PrsMgr_PresentableObject.lxx Diff File
mod - src/Select3D/Select3D_PointData.hxx Diff File
mod - src/SelectMgr/SelectMgr_Selection.cxx Diff File
mod - src/SelectMgr/SelectMgr_Selection.hxx Diff File
mod - src/STEPConstruct/STEPConstruct_ExternRefs.cxx Diff File
mod - src/STEPConstruct/STEPConstruct_ExternRefs.hxx Diff File
mod - src/TCollection/TCollection_ExtendedString.cxx Diff File
mod - src/TCollection/TCollection_ExtendedString.hxx Diff File
mod - src/TCollection/TCollection_HExtendedString.cxx Diff File
mod - src/TCollection/TCollection_HExtendedString.hxx Diff File
mod - src/TestTopOpeTools/TestTopOpeTools_Trace.cxx Diff File
mod - src/TestTopOpeTools/TestTopOpeTools_Trace.hxx Diff File
mod - src/TNaming/FILES Diff File
mod - src/TNaming/TNaming_Name.hxx Diff File
rm - src/TNaming/TNaming_Name.lxx Diff File
mod - src/TopOpeBRepTool/FILES Diff File
mod - src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.cxx Diff File
mod - src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.hxx Diff File
mod - src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.cxx Diff File
mod - src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.hxx Diff File
rm - src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.lxx Diff File

Issue History

Date Modified Username Field Change
2014-01-23 20:07 Hugues Delorme New Issue
2014-01-23 20:07 Hugues Delorme Assigned To => kgv
2014-01-24 09:19 abv Note Added: 0027633
2014-01-24 12:29 Hugues Delorme Note Added: 0027637
2014-04-23 10:14 kgv Priority normal => low
2014-04-23 10:14 kgv Severity minor => integration request
2014-09-12 14:24 abv Target Version => 6.8.0
2014-09-26 16:41 abv Target Version 6.8.0 => 7.1.0
2015-10-16 09:58 kgv Assigned To kgv => rkv
2015-10-16 09:58 kgv Status new => assigned
2015-10-16 09:58 kgv Platform => Linux
2015-10-16 09:58 kgv Target Version 7.1.0 => 7.0.0
2015-10-16 09:58 kgv Summary Annoying GCC warnings [-Wignored-qualifiers] => Coding rules - eliminate GCC warning -Wignored-qualifiers
2015-10-16 09:58 kgv Description Updated
2015-10-16 09:58 kgv Steps to Reproduce Updated
2015-10-16 10:00 kgv Description Updated
2015-11-07 21:53 git Note Added: 0047912
2015-11-07 23:46 abv Note Added: 0047915
2015-11-07 23:46 abv Assigned To rkv => kgv
2015-11-07 23:46 abv Status assigned => resolved
2015-11-08 10:29 kgv Note Added: 0047920
2015-11-08 10:29 kgv Assigned To kgv => bugmaster
2015-11-08 10:29 kgv Status resolved => reviewed
2015-11-09 16:26 mkv Assigned To bugmaster => mkv
2015-11-13 11:53 abv Changeset attached => occt master 487bf1ce
2015-11-13 11:53 abv Assigned To mkv => abv
2015-11-13 11:53 abv Status reviewed => verified
2015-11-13 11:53 abv Resolution open => fixed
2016-04-17 14:23 git Note Added: 0053138
2016-04-20 15:42 aiv Fixed in Version => 7.0.0
2016-04-20 15:51 aiv Status verified => closed