Skip to content

Commit 510bfb9

Browse files
committed
C++: Accept test changes.
1 parent 3d88f08 commit 510bfb9

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,4 @@
1414
| test.cpp:276:11:276:19 | ... > ... | Unsigned subtraction can never be negative. |
1515
| test.cpp:288:10:288:18 | ... > ... | Unsigned subtraction can never be negative. |
1616
| test.cpp:312:9:312:25 | ... > ... | Unsigned subtraction can never be negative. |
17-
| test.cpp:347:9:347:17 | ... > ... | Unsigned subtraction can never be negative. |
18-
| test.cpp:352:6:352:14 | ... > ... | Unsigned subtraction can never be negative. |
19-
| test.cpp:359:10:359:18 | ... > ... | Unsigned subtraction can never be negative. |
2017
| test.cpp:362:8:362:16 | ... > ... | Unsigned subtraction can never be negative. |
21-
| test.cpp:369:10:369:18 | ... > ... | Unsigned subtraction can never be negative. |
22-
| test.cpp:375:8:375:16 | ... > ... | Unsigned subtraction can never be negative. |

cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,19 +344,19 @@ void test21(unsigned long a)
344344
{
345345
{
346346
int b = a & get_int64();
347-
if (a - b > 0) { } // GOOD [FALSE POSITIVE]
347+
if (a - b > 0) { } // GOOD
348348
}
349349

350350
{
351351
int b = a - get_uint32();
352-
if(a - b > 0) { } // GOOD [FALSE POSITIVE]
352+
if(a - b > 0) { } // GOOD
353353
}
354354

355355
{
356356
int64_t c = get_int64();
357357
if(c <= 0) {
358358
int64_t b = (int64_t)a + c;
359-
if(a - b > 0) { } // GOOD [FALSE POSITIVE]
359+
if(a - b > 0) { } // GOOD
360360
}
361361
int64_t b = (int64_t)a + c;
362362
if(a - b > 0) { } // BAD
@@ -366,12 +366,12 @@ void test21(unsigned long a)
366366
unsigned c = get_uint32();
367367
if(c >= 1) {
368368
int b = a / c;
369-
if(a - b > 0) { } // GOOD [FALSE POSITIVE]
369+
if(a - b > 0) { } // GOOD
370370
}
371371
}
372372

373373
{
374374
int b = a >> get_uint32();
375-
if(a - b > 0) { } // GOOD [FALSE POSITIVE]
375+
if(a - b > 0) { } // GOOD
376376
}
377377
}

0 commit comments

Comments
 (0)