diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-03-15 15:29:47 -0300 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-12-22 17:26:19 +0800 |
commit | cdcd551d82c204c031c96cd621b7732b8e93a555 (patch) | |
tree | 1a71df23f4d98744caf41cd9f81406855e8db8ca /localedata/tst-trans.c | |
parent | 46a813466e2da1d1e1857ff0fb41ae0814614e46 (diff) | |
download | glibc-cdcd551d82c204c031c96cd621b7732b8e93a555.zip glibc-cdcd551d82c204c031c96cd621b7732b8e93a555.tar.gz glibc-cdcd551d82c204c031c96cd621b7732b8e93a555.tar.bz2 |
localedata: Fix clang warnings on tests
clang does not support 'I' specifier and handles it as a 'length
modifier'.
Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'localedata/tst-trans.c')
-rw-r--r-- | localedata/tst-trans.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/localedata/tst-trans.c b/localedata/tst-trans.c index 2819bb3..3c0db4d 100644 --- a/localedata/tst-trans.c +++ b/localedata/tst-trans.c @@ -22,6 +22,7 @@ #include <string.h> #include <wchar.h> #include <wctype.h> +#include <libc-diag.h> static int do_test (void) @@ -59,7 +60,12 @@ do_test (void) errors |= len != 10; printf ("len = %d, wbuf = L\"%ls\"\n", len, wbuf); - snprintf (buf, sizeof buf, "%Id", 0x499602D2); + /* clang does not support 'I' specifier and handles it as a 'length + * modifier'. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (16, "-Wformat"); + snprintf (buf, sizeof buf, "%Id", 0x499602D2U); + DIAG_POP_NEEDS_COMMENT_CLANG; errors |= strcmp (buf, "bcdefghija") != 0; len = strlen (buf); errors |= len != 10; |