mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-20 01:12:17 +08:00
Suppress -Wmaybe-uninitialized only for gcc
The warning is not supported by clang. Reviewed-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -180,7 +180,7 @@ get_next_seq (coll_seq *seq, int nrules, const unsigned char *rulesets,
|
||||
ensures that seq->save_idx was saved to first and contains a
|
||||
valid value. */
|
||||
DIAG_PUSH_NEEDS_COMMENT;
|
||||
DIAG_IGNORE_Os_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
|
||||
DIAG_IGNORE_Os_NEEDS_COMMENT_GCC (5, "-Wmaybe-uninitialized");
|
||||
len = weights[idx++];
|
||||
DIAG_POP_NEEDS_COMMENT;
|
||||
/* Skip over indices of previous levels. */
|
||||
@@ -299,7 +299,7 @@ STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, locale_t l)
|
||||
seq2. This uninitialized use is impossible for the same reason
|
||||
as described in comments in locale/weightwc.h. */
|
||||
DIAG_PUSH_NEEDS_COMMENT;
|
||||
DIAG_IGNORE_Os_NEEDS_COMMENT (7, "-Wmaybe-uninitialized");
|
||||
DIAG_IGNORE_Os_NEEDS_COMMENT_GCC (7, "-Wmaybe-uninitialized");
|
||||
coll_seq seq1, seq2;
|
||||
DIAG_POP_NEEDS_COMMENT;
|
||||
seq1.len = 0;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
Since the usage is within the MERGE macro we disable the
|
||||
warning in the definition, but only in this file. */
|
||||
DIAG_PUSH_NEEDS_COMMENT;
|
||||
DIAG_IGNORE_NEEDS_COMMENT (6, "-Wmaybe-uninitialized");
|
||||
DIAG_IGNORE_NEEDS_COMMENT_GCC (6, "-Wmaybe-uninitialized");
|
||||
#include <memcopy.h>
|
||||
DIAG_POP_NEEDS_COMMENT;
|
||||
|
||||
@@ -112,7 +112,7 @@ WORDCOPY_FWD_ALIGNED (long int dstp, long int srcp, size_t len)
|
||||
case. The switch case always sets 'a1' and all previous loop
|
||||
iterations will also have set 'a1' before the use. */
|
||||
DIAG_PUSH_NEEDS_COMMENT;
|
||||
DIAG_IGNORE_NEEDS_COMMENT (6, "-Wmaybe-uninitialized");
|
||||
DIAG_IGNORE_NEEDS_COMMENT_GCC (6, "-Wmaybe-uninitialized");
|
||||
((op_t *) dstp)[0] = a1;
|
||||
DIAG_POP_NEEDS_COMMENT;
|
||||
do7:
|
||||
@@ -313,7 +313,7 @@ WORDCOPY_BWD_ALIGNED (long int dstp, long int srcp, size_t len)
|
||||
a0 = ((op_t *) srcp)[7];
|
||||
/* Check the comment on WORDCOPY_FWD_ALIGNED. */
|
||||
DIAG_PUSH_NEEDS_COMMENT;
|
||||
DIAG_IGNORE_NEEDS_COMMENT (6, "-Wmaybe-uninitialized");
|
||||
DIAG_IGNORE_NEEDS_COMMENT_GCC (6, "-Wmaybe-uninitialized");
|
||||
((op_t *) dstp)[7] = a1;
|
||||
DIAG_POP_NEEDS_COMMENT;
|
||||
do7:
|
||||
|
||||
Reference in New Issue
Block a user