From 74f2dcc52ccf1cc5908b5de2c6dc91203bf5802a Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 22 Aug 2026 10:03:49 +0200 Subject: [PATCH] fix warning of comparision of narrow type ... in loop --- client/src/cmdhfsaflok.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdhfsaflok.c b/client/src/cmdhfsaflok.c index d7fe63b51..61219d771 100644 --- a/client/src/cmdhfsaflok.c +++ b/client/src/cmdhfsaflok.c @@ -673,7 +673,7 @@ static saflok_mfc_datetime_t add_offset(const saflok_mfc_datetime_t *base, const // variable days per month ... loop is simplest option uint8_t curr_days_in_month = get_days_in_month(tm.tm_year + 1900, tm.tm_mon + 1); - for (; ((tm.tm_mday & 0xFF) > curr_days_in_month); curr_days_in_month = get_days_in_month(tm.tm_year + 1900, tm.tm_mon + 1)) { + for (; (tm.tm_mday > (int)curr_days_in_month); curr_days_in_month = get_days_in_month(tm.tm_year + 1900, tm.tm_mon + 1)) { tm.tm_mon ++; tm.tm_mday -= curr_days_in_month;