grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] util/grub-mkfont: use valid conversion specifications in printf


From: Qiumiao Zhang
Subject: [PATCH] util/grub-mkfont: use valid conversion specifications in printf and fprintf
Date: Tue, 11 Oct 2022 20:31:02 +0800

For printf/fprintf functions, unsigned integers should use %u as the valid 
conversion specification instead of %d.

Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
---
 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.28.0.windows.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]