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>
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 = \
* 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