View Issue Details

IDProjectCategoryView StatusLast Update
0027097Open CASCADEOCCT:Codingpublic2016-04-20 15:50
ReporterabvAssigned Toabv 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.0.0Fixed in Version7.0.0 
Summary0027097: GCC and CLang compiler warnings and errors with -Wpedantic
DescriptionIf option -Wpedantic is used, CLang 3.6.2 produces the following additional warnings (on Linux):

/home/abv/occt/src/AIS/AIS_ColoredShape.hxx:178:54: warning: extra ';' inside a
/home/abv/occt/src/AIS/AIS_ColoredShape.hxx:57:58: warning: extra ';' inside a
/home/abv/occt/src/AIS/AIS_TextLabel.hxx:118:63: warning: extra ';' inside a
/home/abv/occt/src/Graphic3d/Graphic3d_Camera.hxx:640:63: warning: extra ';'
/home/abv/occt/src/Graphic3d/Graphic3d_ClipPlane.hxx:221:66: warning: extra ';'
/home/abv/occt/src/IVtkDraw/IVtkDraw_Interactor.hxx:46:64: warning: extra ';'
/home/abv/occt/src/IVtkTools/IVtkTools_DisplayModeFilter.hxx:31:72: warning:
/home/abv/occt/src/IVtkTools/IVtkTools_ShapeDataSource.hxx:36:64: warning:
/home/abv/occt/src/IVtkTools/IVtkTools_ShapeObject.hxx:40:50: warning: extra ';'
/home/abv/occt/src/IVtkTools/IVtkTools_ShapePicker.hxx:32:61: warning: extra ';'
/home/abv/occt/src/IVtkTools/IVtkTools_SubPolyDataFilter.hxx:29:65: warning:

GCC 5.2.1 produces two errors:

/home/abv/occt/src/OSD/OSD_SharedLibrary.cxx:46:51: error: declaration of ‘size_t strlen(const char*)’ has a different exception specifier
/usr/include/string.h:398:15: error: from previous declaration ‘size_t strlen(const char*) throw ()’

/home/abv/occt/src/OSD/OSD_Disk.cxx:35:45: error: declaration of ‘int statvfs(const char*, statvfs*)’ has a different exception specifier
/usr/include/x86_64-linux-gnu/sys/statvfs.h:51:12: error: from previous declaration ‘int statvfs(const char*, statvfs*) throw ()’

and multiple warnings on extra ; after curly braces in declarations (end of namespace or function definition).
Steps To ReproduceBuild with GCC and CLang with additional option -Wpedantic
TagsNo tags attached.
Test case number

Relationships

related to 0027092 closedabv Community Coding - src/BRep/BRep_Tool.hxx extra semicolon triggers annoying warnings on Clang 

Activities

git

2016-01-21 06:47

administrator   ~0049988

Branch CR27097 has been created by abv.

SHA-1: c1417facb505ebf96ea93fd1810083a8106dba58


Detailed log of new commits:

Author: abv
Date: Thu Jan 21 06:46:32 2016 +0300

    0027097: GCC and CLang compiler warnings and errors with -Wpedantic
    
    Useless semicolons are removed after closing braces of namespaces and function bodies.
    
    In OSD_File.cxx and OSD_Disk.cxx, unnecessary declarations of system functions are removed

abv

2016-01-21 06:52

manager   ~0049989

Fix pushed to CR27097, please review. Note that it is based on CR27092 which fixes very similar problem.

Note that some warnings are reported on VTK headers, thus -Wpedantic is not the option to be used permamently

kgv

2016-01-21 10:29

developer   ~0049996

Last edited: 2016-01-21 10:29

Please check compilation, testing is not needed.

The patch _includes_ fix for 0027092 (branch is NOT based on CR27092).

git

2016-04-17 14:07

administrator   ~0053077

Branch CR27097 has been deleted by kgv.

SHA-1: c1417facb505ebf96ea93fd1810083a8106dba58

Related Changesets

occt: master 68858c7d

2016-01-22 08:42:32

abv


Committer: abv Details Diff
0027097: GCC and CLang compiler warnings and errors with -Wpedantic

Useless semicolons are removed after closing braces of namespaces and macros in code dependent on FreeImage and VTK.
Comments added at the closing braces of namespaces to help comprehension.
In OSD_File.cxx and OSD_Disk.cxx, unnecessary declarations of system functions are removed
Affected Issues
0027097
mod - src/Aspect/Aspect_Convert.hxx Diff File
mod - src/BRepMesh/BRepMesh.hxx Diff File
mod - src/Draw/Draw_Interpretor.cxx Diff File
mod - src/Font/Font_FontMgr.cxx Diff File
mod - src/Image/Image_AlienPixMap.cxx Diff File
mod - src/Image/Image_Diff.cxx Diff File
mod - src/IVtkDraw/IVtkDraw_Interactor.cxx Diff File
mod - src/IVtkDraw/IVtkDraw_Interactor.hxx Diff File
mod - src/IVtkTools/IVtkTools.cxx Diff File
mod - src/IVtkTools/IVtkTools.hxx Diff File
mod - src/IVtkTools/IVtkTools_DisplayModeFilter.cxx Diff File
mod - src/IVtkTools/IVtkTools_DisplayModeFilter.hxx Diff File
mod - src/IVtkTools/IVtkTools_ShapeDataSource.cxx Diff File
mod - src/IVtkTools/IVtkTools_ShapeDataSource.hxx Diff File
mod - src/IVtkTools/IVtkTools_ShapeObject.cxx Diff File
mod - src/IVtkTools/IVtkTools_ShapeObject.hxx Diff File
mod - src/IVtkTools/IVtkTools_ShapePicker.cxx Diff File
mod - src/IVtkTools/IVtkTools_ShapePicker.hxx Diff File
mod - src/IVtkTools/IVtkTools_SubPolyDataFilter.cxx Diff File
mod - src/IVtkTools/IVtkTools_SubPolyDataFilter.hxx Diff File
mod - src/IVtkVTK/IVtkVTK_View.cxx Diff File
mod - src/OpenGl/OpenGl_Text.cxx Diff File
mod - src/OSD/OSD_Disk.cxx Diff File
mod - src/OSD/OSD_SharedLibrary.cxx Diff File
mod - src/StdPrs/StdPrs_ShadedShape.cxx Diff File
mod - src/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File

Issue History

Date Modified Username Field Change
2016-01-20 22:27 abv New Issue
2016-01-20 22:27 abv Assigned To => kgv
2016-01-20 23:28 abv Summary CLang compiler warnings with -Wpedantic => GCC and CLang compiler warnings and errors with -Wpedantic
2016-01-20 23:28 abv Description Updated
2016-01-21 06:07 abv Description Updated
2016-01-21 06:47 git Note Added: 0049988
2016-01-21 06:52 abv Note Added: 0049989
2016-01-21 06:52 abv Status new => resolved
2016-01-21 06:52 abv Summary GCC and CLang compiler warnings and errors with -Wpedantic => Coding - GCC and CLang compiler warnings and errors with -Wpedantic
2016-01-21 06:52 abv Steps to Reproduce Updated
2016-01-21 06:52 abv Relationship added related to 0027092
2016-01-21 10:29 kgv Note Added: 0049996
2016-01-21 10:29 kgv Assigned To kgv => bugmaster
2016-01-21 10:29 kgv Status resolved => reviewed
2016-01-21 10:29 kgv Note Edited: 0049996
2016-01-21 11:46 bugmaster Status reviewed => tested
2016-01-21 13:53 abv Summary Coding - GCC and CLang compiler warnings and errors with -Wpedantic => GCC and CLang compiler warnings and errors with -Wpedantic
2016-01-22 12:17 abv Changeset attached => occt master 68858c7d
2016-01-22 12:17 abv Assigned To bugmaster => abv
2016-01-22 12:17 abv Status tested => verified
2016-01-22 12:17 abv Resolution open => fixed
2016-04-17 14:07 git Note Added: 0053077
2016-04-20 15:42 aiv Fixed in Version => 7.0.0
2016-04-20 15:50 aiv Status verified => closed