[PATCH] tests: avoid -Wformat= warning re unsigned mismatch

Pádraig Brady <[email protected]>
Newsgroups gmane.comp.lib.gnulib.bugs
Message-ID <[email protected]>
* tests/test-printf-posix2.c: Specify unsigned int.
---
 ChangeLog                  | 5 +++++
 tests/test-printf-posix2.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 0a0be0feed..3031ad3dd4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2026-08-14  Pádraig Brady  <[email protected]>
+
+	tests: avoid -Wformat= warning re unsigned mismatch
+	* tests/test-printf-posix2.c: Specify unsigned int.
+
 2026-08-14  Pádraig Brady  <[email protected]>
 
 	*printf: Detect %Lf large precision issue on Solaris
diff --git a/tests/test-printf-posix2.c b/tests/test-printf-posix2.c
index d551b39ebc..8fdb1b2c83 100644
--- a/tests/test-printf-posix2.c
+++ b/tests/test-printf-posix2.c
@@ -104,7 +104,7 @@ main (int argc, char *argv[])
       ret = printf ("%.10000000d", -1);
       return !(ret == 10000001 || (ret < 0 && errno == ENOMEM));
     case 6:
-      ret = printf ("%.10000000u", 1);
+      ret = printf ("%.10000000u", 1u);
       return !(ret == 10000000 || (ret < 0 && errno == ENOMEM));
     }
   return 0;
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.