Enabled style and CERT-C addon for CPPCHECK (#869)

* Enabled style and CERT-C addon for CPPCHECK with some suppressions and fixed the defects found..
This commit is contained in:
Steve Karg
2024-12-10 07:56:24 -06:00
committed by GitHub
parent f38b75b389
commit d4cbec91e2
21 changed files with 79 additions and 73 deletions
+2 -3
View File
@@ -37,9 +37,8 @@ uint8_t days_per_month(uint16_t year, uint8_t month)
{
/* note: start with a zero in the first element to save us from a
month - 1 calculation in the lookup */
uint8_t month_days[13] = {
0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};
const uint8_t month_days[13] = { 0, 31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31 };
if ((month == 2) && days_is_leap_year(year)) {
return (29);