C++: Improve name/descr. of leap year queries

This commit is contained in:
Jonas Jensen
2019-08-29 15:53:51 +02:00
parent d4f8e73a66
commit be7be1fb38
2 changed files with 7 additions and 3 deletions

View File

@@ -1,6 +1,8 @@
/**
* @name Year field changed using an arithmetic operation is used on an unchecked time conversion function
* @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.
* @name Arithmetic operation assumes 365 days per year
* @description When an arithmetic operation modifies a date by a constant
* value of 365, it may be a sign that leap years are not taken
* into account.
* @kind problem
* @problem.severity warning
* @id cpp/leap-year/adding-365-days-per-year

View File

@@ -1,6 +1,8 @@
/**
* @name Unchecked return value for time conversion function
* @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
* @description When the return value of a fallible time conversion function is
* not checked for failure, its output parameters may contain
* invalid dates.
* @kind problem
* @problem.severity warning
* @id cpp/leap-year/unchecked-return-value-for-time-conversion-function