-# Disable -Wshadow for that file.
-AM_CFLAGS += -Wno-shadow
-
-AM_CFLAGS += -Wno-missing-field-initializers
-
-AM_CFLAGS += -Wno-cast-function-type
+# Disable some warning flags for that file.
+AM_CFLAGS += \
+ -Wno-cast-function-type \
+ -Wno-missing-field-initializers \
+ -Wno-null-dereference \
+ -Wno-redundant-decls \
+ -Wno-shadow \
+ -Wno-unused-parameter
+
+# Swig regularily changes and generates code that results warnings which break
+# Werror builds. Disable that option for this sub-project.
+AM_CFLAGS += -Wno-error