]> Savannah Git Hosting - gnulib.git/commitdiff
string-buffer tests: Fix a gcc -Wformat warning.
authorBruno Haible <bruno@clisp.org>
Mon, 4 Sep 2023 14:02:36 +0000 (16:02 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 4 Sep 2023 14:02:36 +0000 (16:02 +0200)
* tests/test-string-buffer.c: Don't assume that wint_t has the same size
as 'int'.

ChangeLog
tests/test-string-buffer.c

index 67031f17395f917bfb51ab61b11dda9df1cad9ff..1255dc04fb4925615fcef73d3ce6535b6b7957b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2023-09-04  Bruno Haible  <bruno@clisp.org>
 
+       string-buffer tests: Fix a gcc -Wformat warning.
+       * tests/test-string-buffer.c: Don't assume that wint_t has the same size
+       as 'int'.
+
        crypto/* tests: Fix some gcc -Wdiscarded-qualifiers warnings.
        * tests/test-gc-hmac-md5.c (main): Change type of variables with a
        string literal initializer to 'const char *'.
index 3d26ad25b9ff808d926e742642341f9f57c2ba6c..1c9181d838065456bc5463c4e0c587ce7b75de8b 100644 (file)
@@ -101,7 +101,7 @@ main ()
 
     sb_init (&buffer);
     sb_append (&buffer, "<");
-    sb_appendf (&buffer, "%lc", 0x76543210);
+    sb_appendf (&buffer, "%lc", (wint_t) 0x76543210);
     sb_append (&buffer, "|");
     sb_appendf (&buffer, invalid_format_string_1, 1);
     sb_append (&buffer, "|");