+# SPDX-License-Identifier: GPL-2.0-only
+
# -Wsystem-headers is needed to print warnings in the tracepoint
# description file.
-AM_CPPFLAGS += -I$(srcdir) -Wsystem-headers
+#
+# However, we see some -Wformat-nonliteral warnings in some system headers,
+# so disable that.
+AM_CPPFLAGS += -I$(srcdir) -Wsystem-headers -Wno-format-nonliteral
+
+# Disable some warnings flags to accomodate the tracepoint headers
+AM_CFLAGS += \
+ -Wno-redundant-decls
# Set LIBS to nothing so the application does not link on useless
# libraries.