Menu

#6 yoshimi-1.2.1/src/Misc/Part.cpp:1039: bad if test ?

Next Commit
closed
None
5
2014-08-25
2014-07-21
dcb
No

yoshimi-1.2.1/src/Misc/Part.cpp:1039:22: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op]

if (kititem == 0 && kititem >= NUM_KIT_ITEMS)

Suggest swap && for ||

Discussion

  • Will Godfrey

    Will Godfrey - 2014-07-21
    • status: open --> accepted
    • assigned_to: Will Godfrey
    • Group: V1.2.2 --> Next Commit
     
  • Will Godfrey

    Will Godfrey - 2014-07-21

    Good catch - this one goes back over 10 years!

    Now fixed in the current master branch.

     

    Last edit: Will Godfrey 2014-08-07
  • Will Godfrey

    Will Godfrey - 2014-08-25
    • status: accepted --> closed
     
  • dcb

    dcb - 2014-08-25

    Good catch - this one goes back over 10 years!

    Thanks. You might want to start using flag -Wlogical-op
    in your development builds.

     

Log in to post a comment.