Menu

#45 warning: result of comparison of constant 128 with expression of type 'char' is always false

v1.0_(example)
closed
nobody
None
1
2021-12-09
2021-12-08
Anonymous
No

xlang-12 complains about version 2.5:

/disk-samsung/freebsd-ports/math/mathgl/work/mathgl-2.5/src/canvas.cpp:355:9: warning: result of comparison of constant 128 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
        if(type>128 || type<0)
           ~~~~^~~~
1 warning generated.

Discussion

  • Alexey Balakin

    Alexey Balakin - 2021-12-09
    • status: open --> closed
     
  • Alexey Balakin

    Alexey Balakin - 2021-12-09

    This is done on purpose (not a bug) to bypass the situation using an unsigned char instead of signed one.

     

Anonymous
Anonymous

Add attachments
Cancel