View Issue Details

IDProjectCategoryView StatusLast Update
0026780Open CASCADEOCCT:Codingpublic2016-04-20 15:51
ReporterrkvAssigned Toabv  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformMacOSOS 
Target Version7.0.0Fixed in Version7.0.0 
Summary0026780: Coding rules - eliminate warnings on Linux and Mac
DescriptionThere are warnings which should be eliminated:
- on Linux:

BRepTest_FeatureCommands.cxx:1092, GNU C Compiler 4 (gcc), Priority: Normal
variable 'Fuse' set but not used [-Wunused-but-set-variable]


- on Mac:

ViewerTest.cxx:5716, Clang (LLVM based), Priority: Normal
illegal character encoding in string literal

ViewerTest.cxx:5721, Clang (LLVM based), Priority: Normal
illegal character encoding in string literal

Draw_BasicCommands.cxx:437, Clang (LLVM based), Priority: Normal
comparison of unsigned expression < 0 is always false

OpenGl_Workspace.cxx:57, Clang (LLVM based), Priority: Normal
unused variable 'myDefaultTextParam'

Font_TextFormatter.cxx:49, Clang (LLVM based), Priority: Normal
unused function 'floor'

OSD_DirectoryIterator.hxx:108, Clang (LLVM based), Priority: Normal
private field 'myHandle' is not used

OSD_DirectoryIterator.hxx:109, Clang (LLVM based), Priority: Normal
private field 'myData' is not used

OSD_DirectoryIterator.hxx:110, Clang (LLVM based), Priority: Normal
private field 'myFirstCall' is not used

OSD_FileIterator.hxx:108, Clang (LLVM based), Priority: Normal
private field 'myHandle' is not used

OSD_FileIterator.hxx:109, Clang (LLVM based), Priority: Normal
private field 'myData' is not used

OSD_FileIterator.hxx:110, Clang (LLVM based), Priority: Normal
private field 'myFirstCall' is not used

Select3D_SensitiveTriangulation.hxx:144, Clang (LLVM based), Priority: Normal
private field 'myDetectedTr' is not used

TopOpeBRep_FFDumper.hxx:81, Clang (LLVM based), Priority: Normal
private field 'myEn1' is not used

TopOpeBRep_FFDumper.hxx:82, Clang (LLVM based), Priority: Normal
private field 'myEn2' is not used

TopOpeBRep_FFDumper.hxx:83, Clang (LLVM based), Priority: Normal
private field 'myLineIndex' is not used

TopOpeBRepTool_ShapeExplorer.hxx:86, Clang (LLVM based), Priority: Normal
private field 'myIndex' is not used

TopOpeBRepTool_ShapeExplorer.hxx:87, Clang (LLVM based), Priority: Normal
private field 'myNbShapes' is not used
Steps To ReproduceN/A
TagsNo tags attached.
Test case number

Activities

abv

2015-10-15 18:30

manager   ~0046803

Warning reported by GCC in BRepTest_FeatureCommands.cxx is inside function Debou() which implements DRAW command "deboucle". Since that command is not used in OCCT tests, I suppose we can remove it completely instead of trying to fix that code.

git

2015-11-06 12:08

administrator   ~0047870

Branch CR26780 has been created by rkv.

SHA-1: 6ba4dcd60eed62e7bd2be626dac1351cc8aa8ea2


Detailed log of new commits:

Author: rkv
Date: Fri Nov 6 11:13:14 2015 +0300

    0026780: Coding rules - eliminate warnings on Linux and Mac

kgv

2015-11-06 12:22

developer   ~0047871

Once again - commit description should describe changes in the patch.

git

2015-11-06 13:03

administrator   ~0047872

Branch CR26780 has been updated forcibly by rkv.

SHA-1: ba21fe4462cd998645aae70b0b18080ee3d3c837

kgv

2015-11-06 13:10

developer   ~0047873

> 0026780: Coding rules - eliminate warnings on Linux and Mac
> Warnings in ViewerTest.cxx and Font_TextFormatter.cxx are not reproduced.
by convention, the title in git message should be followed by single empty line.

> Warnings in ViewerTest.cxx and Font_TextFormatter.cxx are not reproduced.
please prefer using Present Simple in commit description.

> BrepTest_FeatureCommands.cxx is not changed because the warning is supposed to be removed in 0026811
this comment is unrelated to patch itself, and thus should not appear in commit description - its place is here, in bugtracker.

rkv

2015-11-06 13:31

developer   ~0047876

> Warnings in ViewerTest.cxx and Font_TextFormatter.cxx are not reproduced.
please prefer using Present Simple in commit description.

You could see that this is exactly the Present Simple, if you know English well enough.

git

2015-11-06 13:36

administrator   ~0047877

Branch CR26780 has been updated forcibly by rkv.

SHA-1: 8981c653909c9ed5a97e9d7b3e19aceb36583ce6

kgv

2015-11-06 13:42

developer   ~0047878

Last edited: 2015-11-06 13:45

> You could see that this is exactly the Present Simple, if you know English well enough.
sorry for confusion and wrong quotation - I've meant imperative present tense.
Here you can find some useful Commit Guidelines:
https://git-scm.com/book/ch5-2.html
> It’s also a good idea to use the imperative present tense in these messages.
> In other words, use commands.
> Instead of "I added tests for" or "Adding tests for," use "Add tests for."

> Warnings in ViewerTest.cxx and Font_TextFormatter.cxx are not reproduced.
actually this message is also unrelated to the patch.

--- a/src/TopOpeBRepTool/TopOpeBRepTool_ShapeExplorer.hxx
+++ b/src/TopOpeBRepTool/TopOpeBRepTool_ShapeExplorer.hxx
+#ifdef OCCT_DEBUG
   Standard_Integer myIndex;
...
--- a/src/TopOpeBRep/TopOpeBRep_FFDumper.hxx
+++ b/src/TopOpeBRep/TopOpeBRep_FFDumper.hxx
+#ifdef OCCT_DEBUG

this change can not be integrated because it conflicts with 0024091.

git

2015-11-06 14:09

administrator   ~0047879

Branch CR26780 has been updated by rkv.

SHA-1: 756ba54909124423d86d5bff6c5a31b4ddc580c7


Detailed log of new commits:

Author: rkv
Date: Fri Nov 6 13:14:57 2015 +0300

    0026780: Coding rules - eliminate warnings on Linux and Mac

git

2015-11-06 14:16

administrator   ~0047880

Branch CR26780 has been updated forcibly by rkv.

SHA-1: 3cb3afbe330ea172ff45623c7105ab46243b8c6c

git

2015-11-06 14:22

administrator   ~0047883

Branch CR26780 has been updated forcibly by rkv.

SHA-1: 7e52dd3a70a22b9fc8359c33691e7eb4060931fb

git

2015-11-07 15:13

administrator   ~0047902

Branch CR26780_1 has been created by abv.

SHA-1: 55ce8d881f69e2e27600ec813e2c924442bb10ae


No new revisions were added by this update.

abv

2015-11-07 15:13

manager   ~0047903

Kirill, please review corrected version in CR26780_1

kgv

2015-11-07 15:51

developer   ~0047907

Last edited: 2015-11-07 15:53

+  Standard_OStream& TopOpeBRepTool_ShapeExplorer::DumpCurrent (Standard_OStream& OS) const

this (TopOpeBRepTool_ShapeExplorer:: within class declaration) will cause new warnings within some compilers.

+      cout<<"("<<I<<",";

nit: it is better to use std::cout if we would like to remove "using namespace std" from OCCT headers in future.

git

2015-11-07 21:31

administrator   ~0047908

Branch CR26780_1 has been updated forcibly by abv.

SHA-1: 85d19083cd54ba2d85df983d8e9f9d8e17b5a94a

git

2015-11-07 21:37

administrator   ~0047910

Branch CR26780_1 has been updated forcibly by abv.

SHA-1: d48df25df16e6f63babd2fd226a7a655e9ca16c7

abv

2015-11-07 23:03

manager   ~0047914

Corrected, please review again

kgv

2015-11-08 10:16

developer   ~0047918

Last edited: 2015-11-08 10:20

Please test the patch.
Note that patch is based on branch for 0026178.

git

2016-04-17 14:23

administrator   ~0053149

Branch CR26780 has been deleted by kgv.

SHA-1: 7e52dd3a70a22b9fc8359c33691e7eb4060931fb

git

2016-04-17 14:23

administrator   ~0053150

Branch CR26780_1 has been deleted by kgv.

SHA-1: d48df25df16e6f63babd2fd226a7a655e9ca16c7

Related Changesets

occt: master d48df25d

2015-11-06 11:22:16

abv


Committer: abv Details Diff
0026780: Coding rules - eliminate warnings on Linux and Mac

Avoid warnings by means of ifdef/ifndef or removing unused code.
Affected Issues
0026780
mod - src/Draw/Draw_BasicCommands.cxx Diff File
mod - src/OpenGl/OpenGl_Workspace.cxx Diff File
mod - src/OSD/OSD_DirectoryIterator.cxx Diff File
mod - src/OSD/OSD_DirectoryIterator.hxx Diff File
mod - src/OSD/OSD_FileIterator.cxx Diff File
mod - src/OSD/OSD_FileIterator.hxx Diff File
mod - src/Select3D/Select3D_SensitiveTriangulation.cxx Diff File
mod - src/Select3D/Select3D_SensitiveTriangulation.hxx Diff File
mod - src/TopOpeBRepTool/FILES Diff File
rm - src/TopOpeBRepTool/TopOpeBRepTool_ShapeExplorer.cxx Diff File
mod - src/TopOpeBRepTool/TopOpeBRepTool_ShapeExplorer.hxx Diff File

occt: master f2139a7f

2015-11-11 06:32:41

abv


Committer: abv Details Diff
0026780: Coding rules - eliminate warnings on Linux and Mac

Fixed a few remaining warnings found by GCC, CLang, and VC++ 14 (recent changes)
Affected Issues
0026780
mod - src/Draft/Draft_Modification_1.cxx Diff File
mod - src/Font/Font_TextFormatter.cxx Diff File
mod - src/ShapeFix/ShapeFix_Shape.cxx Diff File
mod - src/Standard/Standard_ErrorHandler.hxx Diff File
mod - src/STEPCAFControl/STEPCAFControl_Reader.cxx Diff File
mod - src/TopOpeBRep/TopOpeBRep_FFDumper.cxx Diff File
mod - src/TopOpeBRepTool/TopOpeBRepTool_makeTransition.cxx Diff File
mod - src/ViewerTest/ViewerTest.cxx Diff File
mod - src/XDEDRAW/XDEDRAW_GDTs.cxx Diff File

Issue History

Date Modified Username Field Change
2015-10-15 16:49 rkv New Issue
2015-10-15 16:49 rkv Assigned To => rkv
2015-10-15 16:50 rkv Status new => assigned
2015-10-15 18:30 abv Note Added: 0046803
2015-11-06 12:08 git Note Added: 0047870
2015-11-06 12:09 rkv Assigned To rkv => kgv
2015-11-06 12:09 rkv Status assigned => resolved
2015-11-06 12:09 rkv Steps to Reproduce Updated
2015-11-06 12:22 kgv Note Added: 0047871
2015-11-06 12:22 kgv Assigned To kgv => rkv
2015-11-06 12:22 kgv Status resolved => assigned
2015-11-06 13:03 git Note Added: 0047872
2015-11-06 13:07 rkv Assigned To rkv => kgv
2015-11-06 13:07 rkv Status assigned => resolved
2015-11-06 13:10 kgv Note Added: 0047873
2015-11-06 13:10 kgv Assigned To kgv => rkv
2015-11-06 13:10 kgv Status resolved => assigned
2015-11-06 13:31 rkv Note Added: 0047876
2015-11-06 13:36 git Note Added: 0047877
2015-11-06 13:38 rkv Assigned To rkv => kgv
2015-11-06 13:38 rkv Status assigned => resolved
2015-11-06 13:42 kgv Note Added: 0047878
2015-11-06 13:42 kgv Assigned To kgv => rkv
2015-11-06 13:42 kgv Status resolved => assigned
2015-11-06 13:43 kgv Note Edited: 0047878
2015-11-06 13:45 kgv Note Edited: 0047878
2015-11-06 14:09 git Note Added: 0047879
2015-11-06 14:16 git Note Added: 0047880
2015-11-06 14:22 git Note Added: 0047883
2015-11-06 14:24 rkv Assigned To rkv => kgv
2015-11-06 14:24 rkv Status assigned => resolved
2015-11-07 15:13 git Note Added: 0047902
2015-11-07 15:13 abv Note Added: 0047903
2015-11-07 15:51 kgv Note Added: 0047907
2015-11-07 15:52 kgv Note Edited: 0047907
2015-11-07 15:52 kgv Note Edited: 0047907
2015-11-07 15:53 kgv Note Edited: 0047907
2015-11-07 21:31 git Note Added: 0047908
2015-11-07 21:37 git Note Added: 0047910
2015-11-07 23:03 abv Note Added: 0047914
2015-11-08 10:16 kgv Note Added: 0047918
2015-11-08 10:16 kgv Assigned To kgv => bugmaster
2015-11-08 10:16 kgv Status resolved => reviewed
2015-11-08 10:20 kgv Note Edited: 0047918
2015-11-09 11:56 mkv Assigned To bugmaster => mkv
2015-11-13 11:53 abv Changeset attached => occt master f2139a7f
2015-11-13 11:53 abv Changeset attached => occt master d48df25d
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: 0053149
2016-04-17 14:23 git Note Added: 0053150
2016-04-20 15:42 aiv Fixed in Version => 7.0.0
2016-04-20 15:51 aiv Status verified => closed