]> git.earman.xyz Git - sensor-watch.git/commitdiff
fix warning in upstream musl function, see https://git.musl-libc.org/cgit/musl/commit...
authorJoey Castillo <joeycastillo@utexas.edu>
Thu, 13 Mar 2025 03:15:24 +0000 (23:15 -0400)
committerJoey Castillo <joeycastillo@utexas.edu>
Thu, 13 Mar 2025 03:15:24 +0000 (23:15 -0400)
watch-library/shared/watch/watch_utility.c

index 4bf53bc21201f403b296a516b37c5f806153c65e..0c9f403b27b64ae565ca5674816bd59df0000370 100644 (file)
@@ -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) {