]> Savannah Git Hosting - gnulib.git/commitdiff
uniname/uniname: Fix -Wformat-signedness warning.
authorBruno Haible <bruno@clisp.org>
Sun, 4 Jun 2023 08:50:29 +0000 (10:50 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 4 Jun 2023 08:50:29 +0000 (10:50 +0200)
* lib/uniname/uniname.c (unicode_character_name): Use %u instead of %d
in format string.

ChangeLog
lib/uniname/uniname.c

index 959b18d3964fe423c581959a30866808cf73756d..72afbccd728fb6f8a817055248d405a5a490f5ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-06-04  Bruno Haible  <bruno@clisp.org>
+
+       uniname/uniname: Fix -Wformat-signedness warning.
+       * lib/uniname/uniname.c (unicode_character_name): Use %u instead of %d
+       in format string.
+
 2023-06-04  Bruno Haible  <bruno@clisp.org>
 
        uniname/uniname: Improve comments.
index f6ef6956e88b297b022db1703d086a1429dd5c6f..48bae59bec40269837f0132325d6b51c03f86215 100644 (file)
@@ -292,7 +292,7 @@ unicode_character_name (ucs4_t c, char *buf)
          small.  */
 
       /* buf needs to have at least 19 + 3 + 1 bytes here.  */
-      sprintf (buf, "VARIATION SELECTOR-%d",
+      sprintf (buf, "VARIATION SELECTOR-%u",
                c <= 0xFE0F ? c - 0xFE00 + 1 : c - 0xE0100 + 17);
       return buf;
     }