diff --git a/cpp/ql/test/query-tests/Likely Bugs/Arithmetic/UnsignedGEZero/UnsignedGEZero.c b/cpp/ql/test/query-tests/Likely Bugs/Arithmetic/UnsignedGEZero/UnsignedGEZero.c index c35b9d82836..e464008949d 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Arithmetic/UnsignedGEZero/UnsignedGEZero.c +++ b/cpp/ql/test/query-tests/Likely Bugs/Arithmetic/UnsignedGEZero/UnsignedGEZero.c @@ -130,4 +130,11 @@ void myFunction() { } if ((signed int)(unsigned char)(signed char)si >= 0) { // violation } + + if (ui <= 0) { + } + if (0 <= ui) { // violation [NOT DETECTED] + } + if (0 < ui) { + } } diff --git a/cpp/ql/test/query-tests/Likely Bugs/Arithmetic/UnsignedGEZero/UnsignedGEZero.cpp b/cpp/ql/test/query-tests/Likely Bugs/Arithmetic/UnsignedGEZero/UnsignedGEZero.cpp index f6a08cd690b..7b5f91b988c 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Arithmetic/UnsignedGEZero/UnsignedGEZero.cpp +++ b/cpp/ql/test/query-tests/Likely Bugs/Arithmetic/UnsignedGEZero/UnsignedGEZero.cpp @@ -130,4 +130,11 @@ void myFunction() { } if ((signed int)(unsigned char)(signed char)si >= 0) { // violation } + + if (ui <= 0) { + } + if (0 <= ui) { // violation [NOT DETECTED] + } + if (0 < ui) { + } }