From: Joey Castillo Date: Thu, 13 Mar 2025 03:15:24 +0000 (-0400) Subject: fix warning in upstream musl function, see https://git.musl-libc.org/cgit/musl/commit... X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=5fa939786a39c3ba8181140442dbcdf767d92a65;p=sensor-watch.git fix warning in upstream musl function, see https://git.musl-libc.org/cgit/musl/commit/src/time/__year_to_secs.c\?id\=2d84486a08c57d00b647586b7cbe2dcec2728e81 --- diff --git a/watch-library/shared/watch/watch_utility.c b/watch-library/shared/watch/watch_utility.c index 4bf53bc..0c9f403 100644 --- a/watch-library/shared/watch/watch_utility.c +++ b/watch-library/shared/watch/watch_utility.c @@ -123,9 +123,9 @@ static uint32_t __year_to_secs(uint32_t year, int *is_leap) return 31536000*(y-70) + 86400*leaps; } - int cycles, centuries, leaps, rem; + int cycles, centuries, leaps, rem, dummy; - if (!is_leap) is_leap = &(int){0}; + if (!is_leap) is_leap = &dummy; cycles = (year-100) / 400; rem = (year-100) % 400; if (rem < 0) {