aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Botka <16738302+Haxk20@users.noreply.github.com>2023-07-28 02:34:32 +0200
committerGitHub <noreply@github.com>2023-07-27 20:34:32 -0400
commitba4eed175df761e42ce2d6eb2692b82d8d1c779a (patch)
treec48313d79f07cbb9d54d28ebe3d76bdceb447ee2
parentd725dfd309e3db2a7b26b9b452cfde6cb9272f34 (diff)
downloadkutter-ba4eed175df761e42ce2d6eb2692b82d8d1c779a.tar.gz
kutter-ba4eed175df761e42ce2d6eb2692b82d8d1c779a.tar.xz
kutter-ba4eed175df761e42ce2d6eb2692b82d8d1c779a.zip
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 <martin.botka@somainline.org>
-rw-r--r--lib/rp2040_flash/main.c2
1 files changed, 1 insertions, 1 deletions
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;