Skip to content

Commit be7be1f

Browse files
committed
C++: Improve name/descr. of leap year queries
1 parent d4f8e73 commit be7be1f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

cpp/ql/src/Likely Bugs/Leap Year/Adding365DaysPerYear.ql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/**
2-
* @name Year field changed using an arithmetic operation is used on an unchecked time conversion function
3-
* @description A year field changed using an arithmetic operation is used on a time conversion function, but the return value of the function is not checked for success or failure.
2+
* @name Arithmetic operation assumes 365 days per year
3+
* @description When an arithmetic operation modifies a date by a constant
4+
* value of 365, it may be a sign that leap years are not taken
5+
* into account.
46
* @kind problem
57
* @problem.severity warning
68
* @id cpp/leap-year/adding-365-days-per-year

cpp/ql/src/Likely Bugs/Leap Year/UncheckedReturnValueForTimeFunctions.ql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/**
22
* @name Unchecked return value for time conversion function
3-
* @description A year field changed using an arithmetic operation is used on a time conversion function, but the return value of the function is not checked for success or failure
3+
* @description When the return value of a fallible time conversion function is
4+
* not checked for failure, its output parameters may contain
5+
* invalid dates.
46
* @kind problem
57
* @problem.severity warning
68
* @id cpp/leap-year/unchecked-return-value-for-time-conversion-function

0 commit comments

Comments
 (0)