From 73c6bd986d6933ea47649f732b581290f6cb2781 Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Mon, 2 Aug 2021 11:56:47 -0600 Subject: [PATCH] main: Use unsigned modulo Explicitly affix the literal with `U` so SDCC will directly call `moduint()` instead of `modsint()`. Signed-off-by: Tim Crawford --- src/board/system76/common/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/board/system76/common/main.c b/src/board/system76/common/main.c index 942e7dd..34662f8 100644 --- a/src/board/system76/common/main.c +++ b/src/board/system76/common/main.c @@ -99,7 +99,7 @@ void main(void) { uint32_t last_time_fan = 0; for(main_cycle = 0; ; main_cycle++) { - switch (main_cycle % 3) { + switch (main_cycle % 3U) { case 0: // Handle power states power_event();