File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
cpp/ql/test/query-tests/Likely Bugs/Arithmetic/PointlessComparison Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ enum my_enum {
207207};
208208
209209int myFunction6 (enum my_enum e ) {
210- if (e < 0 ) {
210+ if (e < 0 ) { // BAD
211211 return 1 ;
212212 }
213213 return 0 ;
Original file line number Diff line number Diff line change 3131| PointlessComparison.c:126:12:126:18 | ... >= ... | Comparison is always true because a >= 20. |
3232| PointlessComparison.c:129:12:129:16 | ... > ... | Comparison is always false because a <= 3. |
3333| PointlessComparison.c:197:7:197:11 | ... < ... | Comparison is always false because x >= 0. |
34+ | PointlessComparison.c:210:6:210:10 | ... < ... | Comparison is always false because e >= 0. |
3435| PointlessComparison.c:264:12:264:22 | ... >= ... | Comparison is always true because dbl >= 0 and -0 >= - .... |
3536| RegressionTests.cpp:57:7:57:22 | ... <= ... | Comparison is always true because * ... <= 4294967295. |
3637| 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