]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Compile tst-deadline.c with -Wno-ignored-attributes for Clang
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 19 Dec 2024 21:52:56 +0000 (05:52 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 22 Dec 2024 09:49:22 +0000 (17:49 +0800)
Since tst-deadline.c is an internal test, compile tst-deadline.c with
-Wno-ignored-attributes for Clang to silence -Werror,-Wunknown-attributes
errors.  Also suppress -Wmaybe-uninitialized only for GCC in net-internal.h.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
inet/Makefile
inet/net-internal.h

index cb97b45f0f9d223f7d99f3dc1024cacd2c03b07b..b12a1e4228db1de1c262170f3e8daabf825e4153 100644 (file)
@@ -139,6 +139,10 @@ ifeq ($(build-static-nss),yes)
 CFLAGS += -DSTATIC_NSS
 endif
 
+ifeq ($(have-test-clang),yes)
+CFLAGS-tst-deadline.c += -Wno-ignored-attributes
+endif
+
 # The test uses dlopen indirectly and would otherwise load system
 # objects.
 tst-idna_name_classify-ENV = \
index f5749a86629e10155504219abbd96a024c46110a..ad71fbecf00b454cff9b40732727226087e2ee72 100644 (file)
@@ -106,7 +106,7 @@ __deadline_is_infinite (struct deadline deadline)
  *    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91691
  */
 DIAG_PUSH_NEEDS_COMMENT;
-DIAG_IGNORE_NEEDS_COMMENT (9, "-Wmaybe-uninitialized");
+DIAG_IGNORE_NEEDS_COMMENT_GCC (9, "-Wmaybe-uninitialized");
 
 /* Return true if the current time is at the deadline or past it.  */
 static inline bool