mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
CPP: Fix for explicitly cast expressions.
This commit is contained in:
@@ -4,4 +4,5 @@
|
||||
| test.c:11:2:11:8 | ... << ... | AV Rule 164: The right-hand operand (here a value is 8) of this shift shall lie between 0 and 7. |
|
||||
| test.c:18:2:18:9 | ... >> ... | AV Rule 164: The right-hand operand (here a value is -1) of this shift shall lie between 0 and 7. |
|
||||
| test.c:21:2:21:8 | ... >> ... | AV Rule 164: The right-hand operand (here a value is 8) of this shift shall lie between 0 and 7. |
|
||||
| test.c:23:2:23:25 | ... >> ... | AV Rule 164: The right-hand operand (here a value is -1) of this shift shall lie between 0 and 31. |
|
||||
| test.c:23:2:23:25 | ... >> ... | AV Rule 164: The right-hand operand (here a value is -1) of this shift shall lie between 0 and 7. |
|
||||
| test.c:26:2:26:24 | ... >> ... | AV Rule 164: The right-hand operand (here a value is 8) of this shift shall lie between 0 and 7. |
|
||||
|
||||
@@ -23,6 +23,6 @@ void f(unsigned char uc, signed char sc, int i) {
|
||||
((unsigned char)i) >> -1; // BAD
|
||||
((unsigned char)i) >> 0;
|
||||
((unsigned char)i) >> 7;
|
||||
((unsigned char)i) >> 8; // BAD [NOT DETECTED]
|
||||
((unsigned char)i) >> 8; // BAD
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user