Skip to content

Commit 38219f6

Browse files
committed
C++: Fixing FP in unit tests.
1 parent a233930 commit 38219f6

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedLeapYearAfterYearModification.expected

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| test.cpp:440:2:440:11 | ... ++ | test.cpp:440:2:440:11 | ... ++ | test.cpp:440:2:440:11 | ... ++ | Year field has been modified, but no appropriate check for LeapYear was found. |
44
| test.cpp:456:2:456:12 | ... ++ | test.cpp:456:2:456:12 | ... ++ | test.cpp:456:2:456:12 | ... ++ | Year field has been modified, but no appropriate check for LeapYear was found. |
55
| test.cpp:681:2:681:23 | ... += ... | test.cpp:681:2:681:23 | ... += ... | test.cpp:681:2:681:23 | ... += ... | Year field has been modified, but no appropriate check for LeapYear was found. |
6-
| test.cpp:769:2:769:23 | ... -= ... | test.cpp:769:2:769:23 | ... -= ... | test.cpp:769:2:769:23 | ... -= ... | Year field has been modified, but no appropriate check for LeapYear was found. |
76
| test.cpp:813:2:813:40 | ... = ... | test.cpp:813:21:813:40 | ... + ... | test.cpp:813:2:813:40 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. |
87
| test.cpp:818:2:818:24 | ... = ... | test.cpp:818:13:818:24 | ... + ... | test.cpp:818:2:818:24 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. |
98
| test.cpp:951:3:951:25 | ... = ... | test.cpp:951:14:951:25 | ... + ... | test.cpp:951:3:951:25 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. |
@@ -75,7 +74,6 @@ nodes
7574
| test.cpp:456:2:456:12 | ... ++ | semmle.label | ... ++ |
7675
| test.cpp:482:3:482:12 | ... ++ | semmle.label | ... ++ |
7776
| test.cpp:681:2:681:23 | ... += ... | semmle.label | ... += ... |
78-
| test.cpp:769:2:769:23 | ... -= ... | semmle.label | ... -= ... |
7977
| test.cpp:813:2:813:40 | ... = ... | semmle.label | ... = ... |
8078
| test.cpp:813:21:813:40 | ... + ... | semmle.label | ... + ... |
8179
| test.cpp:818:2:818:24 | ... = ... | semmle.label | ... = ... |

cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ void Incorrect_LinuxPattern()
766766

767767
/* from 1900 -> from 1980 */
768768
// BUG - UncheckedLeapYearAfterYearModification
769-
timeinfo.tm_year -= 80; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification]
769+
timeinfo.tm_year -= 80;
770770
/* 0~11 -> 1~12 */
771771
timeinfo.tm_mon++;
772772
/* 0~59 -> 0~29(2sec counts) */

0 commit comments

Comments
 (0)