diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/Adding365DaysPerYear/test.cpp b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/Adding365DaysPerYear/test.cpp index 4e8a1a26678..a14667c75ca 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/Adding365DaysPerYear/test.cpp +++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/Adding365DaysPerYear/test.cpp @@ -171,7 +171,7 @@ void antipattern2() // copy back to a FILETIME ft.dwLowDateTime = (DWORD)(qwLongTime & 0xFFFFFFFF); // BAD - ft.dwHighDateTime = (DWORD)(qwLongTime >> 32); + ft.dwHighDateTime = (DWORD)(qwLongTime >> 32); // BAD // convert back to SYSTEMTIME for display or other usage FileTimeToSystemTime(&ft, &st); @@ -215,7 +215,7 @@ void checkedExample() // copy back to a FILETIME ft.dwLowDateTime = (DWORD)(qwLongTime & 0xFFFFFFFF); // GOOD [FALSE POSITIVE] - ft.dwHighDateTime = (DWORD)(qwLongTime >> 32); + ft.dwHighDateTime = (DWORD)(qwLongTime >> 32); // GOOD [FALSE POSITIVE] // convert back to SYSTEMTIME for display or other usage if (FileTimeToSystemTime(&ft, &st) == 0) diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/test.cpp b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/test.cpp index 9390d3565b0..3db9b61edd2 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/test.cpp +++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/test.cpp @@ -445,7 +445,7 @@ void CorrectPattern_check4() if (fixDate(st.wDay, st.wMonth, st.wYear)) { // move back a day when landing on Feb 29 in an non-leap year - st.wDay = 28; + st.wDay = 28; // GOOD [FALSE POSITIVE] } // Safe to use @@ -715,9 +715,9 @@ void modified3() GetSystemTime(&st); - st.wYear = st.wYear + 1; + st.wYear = st.wYear + 1; // BAD - SystemTimeToFileTime(&st, &ft); // BAD + SystemTimeToFileTime(&st, &ft); } void modified4() @@ -728,9 +728,9 @@ void modified4() GetSystemTime(&st); - st.wYear++; - st.wYear++; - st.wYear++; + st.wYear++; // BAD + st.wYear++; // BAD + st.wYear++; // BAD - SystemTimeToFileTime(&st, &ft); // BAD + SystemTimeToFileTime(&st, &ft); }