vs.c: 2 * bad if test ?
Bug #1348559 reported by
dcb
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
jupp |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
vs.c:18:15: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op]
vs.c:20:15: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op]
if (a >= 'A' || a <= 'Z')
a += 'a' - 'A';
if (b >= 'A' || b <= 'Z')
b += 'a' - 'A';
Suggest swap || for &&
To post a comment you must log in.
Thanks for spotting. I removed the entire function, it was unused anyway. Please ignore the warning in this case.
Feel free to submit any other low-hanging fruits or severe mistakes, though ;-)