View Issue Details

IDProjectCategoryView StatusLast Update
0032763Open CASCADEOCCT:Codingpublic2023-03-19 22:25
Reporterkgv Assigned Tovpozdyayev 
PrioritynormalSeveritytrivial 
Status closedResolutionfixed 
Product Version6.6.0 
Target Version7.7.0Fixed in Version7.6.1 
Summary0032763: Coding Rules - eliminate CLang warning -Wbitwise-instead-of-logical in math_FunctionSetRoot.cxx
DescriptionThe following CLang (Emscripten 2.0.34) warnings should be eliminated:
C:\occt.git\src\math\math_FunctionSetRoot.cxx:739:22: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
    myIsDivergent |= (Sol(i) < theInfBound(i)) | (theSupBound(i) < Sol(i));
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                               ||
C:\occt.git\src\math\math_FunctionSetRoot.cxx:739:22: note: cast one or both operands to int to silence this warning
C:\occt.git\src\math\math_FunctionSetRoot.cxx:814:24: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
      myIsDivergent |= (Sol(i) < theInfBound(i)) | (theSupBound(i) < Sol(i));
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                 ||
C:\work\occt\occt.git-qt\src\math\math_FunctionSetRoot.cxx:814:24: note: cast one or both operands to int to silence this warning
C:\work\occt\occt.git-qt\src\math\math_FunctionSetRoot.cxx:880:32: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
              myIsDivergent |= (Sol(i) < theInfBound(i)) | (theSupBound(i) < Sol(i));
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                         ||
C:\occt.git\src\math\math_FunctionSetRoot.cxx:880:32: note: cast one or both operands to int to silence this warning
C:\occt.git\src\math\math_FunctionSetRoot.cxx:918:36: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
                  myIsDivergent |= (Sol(i) < theInfBound(i)) | (theSupBound(i) < Sol(i));
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                             ||
C:\occt.git\src\math\math_FunctionSetRoot.cxx:918:36: note: cast one or both operands to int to silence this warning
C:\occt.git\src\math\math_FunctionSetRoot.cxx:1000:34: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
                myIsDivergent |= (Sol(i) < theInfBound(i)) | (theSupBound(i) < Sol(i));
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                           ||
C:\occt.git\src\math\math_FunctionSetRoot.cxx:1000:34: note: cast one or both operands to int to silence this warning
C:\occt.git\src\math\math_FunctionSetRoot.cxx:1043:36: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
                  myIsDivergent |= (Sol(i) < theInfBound(i)) | (theSupBound(i) < Sol(i));
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                             ||
C:\occt.git\src\math\math_FunctionSetRoot.cxx:1043:36: note: cast one or both operands to int to silence this warning
C:\occt.git\src\math\math_FunctionSetRoot.cxx:1086:34: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
                myIsDivergent |= (Sol(i) < theInfBound(i)) | (theSupBound(i) < Sol(i));
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                           ||
C:\occt.git\src\math\math_FunctionSetRoot.cxx:1086:34: note: cast one or both operands to int to silence this warning
7 warnings generated.


The same applies also to constructions like "if (theStopOnDivergent & myIsDivergent)"
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberN/A

Activities

git

2022-01-12 19:51

administrator   ~0106319

Branch CR32763 has been created by kgv.

SHA-1: 5df1aeabf87fe3fcc677d04380498350d770a517


Detailed log of new commits:

Author: kgv
Date: Wed Jan 12 19:51:18 2022 +0300

    0032763: Coding Rules - eliminate CLang warning -Wbitwise-instead-of-logical in math_FunctionSetRoot.cxx

kgv

2022-01-13 09:30

developer   ~0106326

Please raise the patch
- OCCT: branch CR32763.

http://jenkins-test-occt/view/CR32763-master-KGV/

git

2022-01-15 01:39

administrator   ~0106381

Branch CR32763 has been updated by kgv.

SHA-1: 8a01641b2ec6c879f01b97e81e4e952707dd9fdd


Detailed log of new commits:

Author: kgv
Date: Sat Jan 15 01:39:19 2022 +0300

    0032779: Visualization, TKOpenGl - support using a wide color window buffer format (10bit per component / 30bit RGB)
    
    Added new flag OpenGl_Caps::buffersDeepColor disabled by default.
    OpenGl_Window now tries to find a RGB10_A2 pixel format using wglChoosePixelFormatARB().
    OpenGl_TextureFormat::FindSizedFormat() - added handling of GL_RGB10_A2 internal format.
    OpenGl_View::SetWindow() now selects preferred FBO color format basing on parameters.
    OpenGl_Context::DiagnosticInformation()/OpenGl_View::DiagnosticInformation() now include
    information about window pixel format / FBO texture format.

git

2022-01-15 01:40

administrator   ~0106383

Branch CR32763 has been updated forcibly by kgv.

SHA-1: 5df1aeabf87fe3fcc677d04380498350d770a517

smoskvin

2022-01-15 14:07

administrator   ~0106397

Combination -
OCCT branch : IR-2022-01-14
master SHA - 71943b31f820c2b9191854299241dd82c2716eaf
49e51745631c52b6c452c65adae4d6dfa21a1b1e
Products branch : IR-2022-01-14 SHA - 13a1d612d3ecdc2ed1a10120341e9df4c3d9fd2e
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18239.750000000447 / 18223.400000000463 [+0.09%]
Products
Total CPU difference: 11656.240000000102 / 11659.240000000125 [-0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19987.609375 / 20012.3125 [-0.12%]
Products
Total CPU difference: 13139.84375 / 13120.265625 [+0.15%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2022-01-15 14:37

administrator   ~0106405

Branch CR32763 has been deleted by mnt.

SHA-1: 5df1aeabf87fe3fcc677d04380498350d770a517

Related Changesets

occt: master dfa2a671

2022-01-12 19:51:18

kgv


Committer: smoskvin Details Diff
0032763: Coding Rules - eliminate CLang warning -Wbitwise-instead-of-logical in math_FunctionSetRoot.cxx Affected Issues
0032763
mod - src/math/FILES Diff File
mod - src/math/math_FunctionSetRoot.cxx Diff File
mod - src/math/math_FunctionSetRoot.hxx Diff File
rm - src/math/math_FunctionSetRoot.lxx Diff File

Issue History

Date Modified Username Field Change
2022-01-09 13:43 kgv New Issue
2022-01-09 13:43 kgv Assigned To => kgv
2022-01-09 13:46 kgv Product Version 7.6.0 => 6.6.0
2022-01-09 13:46 kgv Description Updated
2022-01-12 19:51 git Note Added: 0106319
2022-01-13 09:30 kgv Assigned To kgv => bugmaster
2022-01-13 09:30 kgv Severity minor => trivial
2022-01-13 09:30 kgv Status new => resolved
2022-01-13 09:30 kgv Steps to Reproduce Updated
2022-01-13 09:30 kgv Test case number => N/A
2022-01-13 09:30 kgv Note Added: 0106326
2022-01-13 09:31 kgv Status resolved => reviewed
2022-01-15 01:39 git Note Added: 0106381
2022-01-15 01:40 git Note Added: 0106383
2022-01-15 14:07 smoskvin Status reviewed => tested
2022-01-15 14:07 smoskvin Note Added: 0106397
2022-01-15 14:26 smoskvin Changeset attached => occt master dfa2a671
2022-01-15 14:26 kgv Assigned To bugmaster => kgv
2022-01-15 14:26 kgv Status tested => verified
2022-01-15 14:26 kgv Resolution open => fixed
2022-01-15 14:37 git Note Added: 0106405
2022-10-19 15:56 smoskvin Assigned To kgv => vpozdyayev
2023-03-19 22:25 vglukhik Status verified => closed
2023-03-19 22:25 vglukhik Fixed in Version => 7.6.1