From ba4eed175df761e42ce2d6eb2692b82d8d1c779a Mon Sep 17 00:00:00 2001 From: Martin Botka <16738302+Haxk20@users.noreply.github.com> Date: Fri, 28 Jul 2023 02:34:32 +0200 Subject: [PATCH] rp2040_flash: Fix the type when printing num_blocks (#6279) image->num_blocks is of type unsigned size_t thus unsigned int or unsigned long int. %lu specifies a type of long unsigned int. Thus resulting in compiler warning about type mismatch on some systems. Fix this by printing the value with length modified z. Signed-off-by: Martin Botka --- lib/rp2040_flash/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rp2040_flash/main.c b/lib/rp2040_flash/main.c index 1c111951..e938eb35 100644 --- a/lib/rp2040_flash/main.c +++ b/lib/rp2040_flash/main.c @@ -174,7 +174,7 @@ int main(int argc, char *argv[]) { rc = 1; goto do_exit; } - fprintf(stderr, "Loaded UF2 image with %lu pages\n", image->num_blocks); + fprintf(stderr, "Loaded UF2 image with %zu pages\n", image->num_blocks); bool has_target = false; uint8_t target_bus = 0;