]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
util/grub-mkfont: Use valid conversion specifiers in printf() and fprintf()
authorQiumiao Zhang <zhangqiumiao1@huawei.com>
Tue, 11 Oct 2022 12:31:02 +0000 (20:31 +0800)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 27 Oct 2022 13:47:34 +0000 (15:47 +0200)
For printf()/fprintf() functions, unsigned integers should use %u as the
valid conversion specifier instead of %d.

Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
util/grub-mkfont.c

index 17eefe15de6e2b2bd3e10ba502abff823bcac620..7624d7808b71256c54a6d5b2a4c57792ef7905d0 100644 (file)
@@ -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);
        }
     }
 }