Archived issue #0024893

CLang warnings -Wlogical-not-parentheses for gce_Done comparisons

CommunityOCCT:Codingclosed3 public notes

Search issues

Description

#0024818 seems to have covered a lot of these already but all the comparisons using the enum gce_Done were not mentioned. gce_Done is an enumerated type so !TheError == gce_Done really makes no sense, I'm guessing the original intention was !(TheError == gce_Done) since ! is evaluated before ==.

Public activity

3 archived notes

Participants are labeled by their role within this record.

01Commenter 1
Fix pushed to branch CR24893, please review.

(The problem has not been reported within #0024818 because it shows up only in Debug builds)
02Commenter 2
Please test the patch.
03Commenter 3
Dear Commenter 1,

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

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)

products component :
Linux: 12 (12 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 356949536 / 355561056
Total CPU difference: 50883.94000000006 / 53337.799999999814

Testing on Windows:
Total MEMORY difference: 379793796 / 379843896
Total CPU difference: 37685.328125 / 36615.28125

There are no differences in images found by testdiff.