silence coverity warnings
This commit is contained in:
@@ -161,6 +161,14 @@ dns_time64_fromtext(const char *source, isc_int64_t *target) {
|
||||
RANGE(1, 12, month);
|
||||
RANGE(1, days[month - 1] +
|
||||
((month == 2 && is_leap(year)) ? 1 : 0), day);
|
||||
#ifdef __COVERITY__
|
||||
/*
|
||||
* Use a simplified range to silence Coverity warning (in
|
||||
* arithmetic with day below).
|
||||
*/
|
||||
RANGE(1, 31, day);
|
||||
#endif /* __COVERITY__ */
|
||||
|
||||
RANGE(0, 23, hour);
|
||||
RANGE(0, 59, minute);
|
||||
RANGE(0, 60, second); /* 60 == leap second. */
|
||||
|
||||
Reference in New Issue
Block a user