mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
[CPP-434] One bad usage is undetected; adjust test accordingly.
This commit is contained in:
@@ -32,7 +32,7 @@ bool shortShort1(unsigned short n1, unsigned short delta) {
|
||||
// clang 8.0.0 -O2: deleted
|
||||
// gcc 9.2 -O2: deleted
|
||||
// msvc 19.22 /O2: not deleted
|
||||
return n1 + delta < n1; // BAD
|
||||
return n1 + delta < n1; // BAD [NOT DETECTED]
|
||||
}
|
||||
|
||||
bool shortShort2(unsigned short n1, unsigned short delta) {
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
| SignedOverflowCheck.cpp:8:12:8:22 | ... < ... | Testing for signed overflow may produce undefined results. |
|
||||
| SignedOverflowCheck.cpp:18:12:18:26 | ... < ... | Testing for signed overflow may produce undefined results. |
|
||||
| SignedOverflowCheck.cpp:35:9:35:23 | ... < ... | Testing for signed overflow may produce undefined results. |
|
||||
|
||||
Reference in New Issue
Block a user