File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
cpp/ql/test/query-tests/Likely Bugs/Arithmetic/PointlessComparison Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ int unsigned_implicit_conversion(unsigned int ui1) {
300300
301301int signedness_cast1 (u8 c ) {
302302 if ((signed char )c == 0 ) {
303- if (c >= 5 ) { // BAD [NOT DETECTED]
303+ if (c >= 5 ) { // BAD
304304 return 1 ;
305305 }
306306 }
@@ -309,7 +309,7 @@ int signedness_cast1(u8 c) {
309309
310310int signedness_cast2 (signed char c ) {
311311 if ((u8 )c == 0 ) {
312- if (c >= 5 ) { // BAD [NOT DETECTED]
312+ if (c >= 5 ) { // BAD
313313 return 1 ;
314314 }
315315 }
Original file line number Diff line number Diff line change 3535| PointlessComparison.c:273:9:273:18 | ... > ... | Comparison is always false because c <= 0. |
3636| PointlessComparison.c:283:13:283:19 | ... >= ... | Comparison is always true because c >= 11. |
3737| PointlessComparison.c:294:9:294:16 | ... >= ... | Comparison is always false because ui1 <= 0. |
38+ | PointlessComparison.c:303:9:303:14 | ... >= ... | Comparison is always false because c <= 0. |
39+ | PointlessComparison.c:312:9:312:14 | ... >= ... | Comparison is always false because c <= 0. |
3840| PointlessComparison.c:337:14:337:21 | ... >= ... | Comparison is always true because x >= 0. |
3941| RegressionTests.cpp:57:7:57:22 | ... <= ... | Comparison is always true because * ... <= 4294967295. |
4042| Templates.cpp:9:10:9:24 | ... <= ... | Comparison is always true because local <= 32767. |
You can’t perform that action at this time.
0 commit comments