View Issue Details

IDProjectCategoryView StatusLast Update
0026178Open CASCADEOCCT:Codingpublic2017-07-27 11:40
Reporterkgv Assigned Toabv  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformMacOSOS 
Target Version7.0.0Fixed in Version7.0.0 
Summary0026178: Coding rules - eliminate -Wtautological-pointer-compare CLang warnings in Standard_ErrorHandler
DescriptionThe following warnings should be eliminated:
occt/src/Standard/Standard_ErrorHandler.cxx:142:40: warning: comparison of array 'anActive->myLabel' not equal to a null pointer is always true [-Wtautological-pointer-compare]
  return anActive != NULL && anActive->myLabel != NULL;
                             ~~~~~~~~~~^~~~~~~    ~~~~
occt/src/Standard/Standard_ErrorHandler.cxx:156:36: warning: comparison of array 'anActive->myLabel' equal to a null pointer is always false [-Wtautological-pointer-compare]
  if(anActive == NULL || anActive->myLabel == NULL) {
                         ~~~~~~~~~~^~~~~~~    ~~~~
Steps To ReproduceCompile with CLang
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0025078 closedabv Community Coding rules - eliminate GCC warning -Wclobbered 

Activities

git

2015-11-06 07:55

administrator   ~0047852

Branch CR26178 has been created by abv.

SHA-1: c9246067a1a0b1b533cffd767d01e8c000c5dc06


Detailed log of new commits:

Author: abv
Date: Fri Nov 6 07:54:57 2015 +0300

    0026178: Coding rules - eliminate -Wtautological-pointer-compare CLang warnings in Standard_ErrorHandler
    
    Tautological comparisons removed; buffer initialized by zeros; LXX files merged to HXX; descriptions added

abv

2015-11-06 07:56

manager   ~0047853

Fix pushed to CR26178, please review

kgv

2015-11-06 09:41

developer   ~0047863

Please test the patch.

git

2015-11-07 15:12

administrator   ~0047901

Branch CR26178 has been updated by abv.

SHA-1: 55ce8d881f69e2e27600ec813e2c924442bb10ae


Detailed log of new commits:

Author: rkv
Date: Fri Nov 6 14:22:16 2015 +0300

    0026780: Coding rules - eliminate warnings on Linux and Mac
    
    Avoid warnings by means of ifdef/ifndef or removing unused code.

git

2015-11-07 21:31

administrator   ~0047909

Branch CR26178 has been updated forcibly by abv.

SHA-1: c9246067a1a0b1b533cffd767d01e8c000c5dc06

mkv

2015-11-09 14:29

tester   ~0047950

Dear BugMaster,
Branch CR26178 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: c9246067a1a0b1b533cffd767d01e8c000c5dc06

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 147 (149 on master)

products component :
Linux: 39 (39 on master)
Windows: 0 (0 on master)

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 93306908 / 92271245 [+1.12%]
Total CPU difference: 19678.13999999974 / 19655.429999999847 [+0.12%]
products component :
Total MEMORY difference: 26228971 / 26273564 [-0.17%]
Total CPU difference: 7506.339999999995 / 7540.919999999997 [-0.46%]

Testing on Windows:
occt component :
Total MEMORY difference: 58085435 / 58098072 [-0.02%]
Total CPU difference: 18308.1525591991 / 18063.48059079889 [+1.35%]
products component :
Total MEMORY difference: 17163446 / 17166598 [-0.02%]
Total CPU difference: 5650.4654206999685 / 5624.304052999975 [+0.47%]

There are no differences in images found by testdiff.

mkv

2015-11-09 14:29

tester   ~0047951

Dear BugMaster,
Branch CR26178 is TESTED.

git

2016-04-17 14:23

administrator   ~0053140

Branch CR26178 has been deleted by kgv.

SHA-1: c9246067a1a0b1b533cffd767d01e8c000c5dc06

Related Changesets

occt: master c9246067

2015-11-06 04:54:57

abv


Committer: abv Details Diff
0026178: Coding rules - eliminate -Wtautological-pointer-compare CLang warnings in Standard_ErrorHandler

Tautological comparisons removed; buffer initialized by zeros; LXX files merged to HXX; descriptions added
Affected Issues
0026178
mod - src/Standard/FILES Diff File
mod - src/Standard/Standard_ErrorHandler.cxx Diff File
mod - src/Standard/Standard_ErrorHandler.hxx Diff File
rm - src/Standard/Standard_ErrorHandler.lxx Diff File
mod - src/Standard/Standard_ErrorHandlerCallback.hxx Diff File
rm - src/Standard/Standard_ErrorHandlerCallback.lxx Diff File

Issue History

Date Modified Username Field Change
2015-04-30 17:13 kgv New Issue
2015-04-30 17:13 kgv Assigned To => kgv
2015-04-30 17:13 kgv Assigned To kgv => pdn
2015-04-30 17:13 kgv Status new => assigned
2015-11-06 07:55 git Note Added: 0047852
2015-11-06 07:56 abv Note Added: 0047853
2015-11-06 07:56 abv Assigned To pdn => kgv
2015-11-06 07:56 abv Status assigned => resolved
2015-11-06 07:56 abv Steps to Reproduce Updated
2015-11-06 07:56 abv Target Version 7.1.0 => 7.0.0
2015-11-06 07:56 abv Relationship added related to 0025078
2015-11-06 09:41 kgv Note Added: 0047863
2015-11-06 09:41 kgv Assigned To kgv => bugmaster
2015-11-06 09:41 kgv Status resolved => reviewed
2015-11-06 13:29 mkv Assigned To bugmaster => mkv
2015-11-07 15:12 git Note Added: 0047901
2015-11-07 21:31 git Note Added: 0047909
2015-11-09 14:29 mkv Note Added: 0047950
2015-11-09 14:29 mkv Note Added: 0047951
2015-11-09 14:29 mkv Assigned To mkv => bugmaster
2015-11-09 14:29 mkv Status reviewed => tested
2015-11-09 14:29 mkv Test case number => Not needed
2015-11-13 11:53 abv Changeset attached => occt master c9246067
2015-11-13 11:53 abv Assigned To bugmaster => abv
2015-11-13 11:53 abv Status tested => verified
2015-11-13 11:53 abv Resolution open => fixed
2016-04-17 14:23 git Note Added: 0053140
2016-04-20 15:42 aiv Fixed in Version => 7.0.0
2016-04-20 15:51 aiv Status verified => closed