From 5b58914d8c364eedb0c40483c6cfba0cb9d2a822 Mon Sep 17 00:00:00 2001 From: Qiumiao Zhang Date: Tue, 11 Oct 2022 20:31:02 +0800 Subject: [PATCH] util/grub-mkfont: Use valid conversion specifiers in printf() and fprintf() For printf()/fprintf() functions, unsigned integers should use %u as the valid conversion specifier instead of %d. Signed-off-by: Qiumiao Zhang Reviewed-by: Daniel Kiper --- util/grub-mkfont.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c index 17eefe15d..7624d7808 100644 --- a/util/grub-mkfont.c +++ b/util/grub-mkfont.c @@ -483,7 +483,7 @@ subst (const struct gsub_substitution *sub, grub_uint32_t glyph, if (substtype == GSUB_SUBSTITUTION_DELTA) add_subst (glyph, glyph + grub_be_to_cpu16 (sub->delta), target); else if (*i >= grub_be_to_cpu16 (sub->count)) - printf (_("Out of range substitution (%d, %d)\n"), *i, + printf (_("Out of range substitution (%d, %u)\n"), *i, grub_be_to_cpu16 (sub->count)); else add_subst (glyph, grub_be_to_cpu16 (sub->repl[(*i)++]), target); @@ -563,7 +563,7 @@ process_cursive (struct gsub_feature *feature, if (substtype != GSUB_SUBSTITUTION_MAP && substtype != GSUB_SUBSTITUTION_DELTA) { - printf (_("Unsupported substitution specification: %d\n"), + printf (_("Unsupported substitution specification: %u\n"), substtype); continue; } @@ -610,7 +610,7 @@ process_cursive (struct gsub_feature *feature, This warning is thrown when another coverage specification is detected. */ fprintf (stderr, - _("Unsupported coverage specification: %d\n"), covertype); + _("Unsupported coverage specification: %u\n"), covertype); } } } -- 2.47.2