mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-13 04:30:07 +00:00
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>
This commit is contained in:
parent
46a813466e
commit
cdcd551d82
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user