]> granicus.if.org Git - libvpx/commitdiff
Expand -Wextra to more of the library
authorJohann <johannkoenig@google.com>
Tue, 13 Sep 2016 21:01:38 +0000 (14:01 -0700)
committerJohann <johannkoenig@google.com>
Tue, 27 Sep 2016 20:19:27 +0000 (13:19 -0700)
Suppress warnings in third_party/.

vp8 -Wclobbered issue is tracked here:
BUG=webm:1246

BUG=webm:1069

Change-Id: I9b94bf546d7b690c26a59ae67967facdce8ec45b

configure
examples.mk
libs.mk

index 95af2e395e37c7d2a890e965087e0d052f391ea1..27ec8d9ccbbecb0b01f23c703115decc7e2bc753 100755 (executable)
--- a/configure
+++ b/configure
@@ -575,6 +575,11 @@ process_toolchain() {
         check_add_cflags -Wimplicit-function-declaration
         check_add_cflags -Wuninitialized
         check_add_cflags -Wunused
+        # -Wextra has some tricky cases. Rather than fix them all now, get the
+        # flag for as many files as possible and fix the remaining issues
+        # piecemeal.
+        # https://bugs.chromium.org/p/webm/issues/detail?id=1069
+        check_add_cflags -Wextra
         # check_add_cflags also adds to cxxflags. gtest does not do well with
         # -Wundef so add it explicitly to CFLAGS only.
         check_cflags -Wundef && add_cflags_only -Wundef
index cc7fb1ddcf3ed21c34e9708682f50935ef42b7a1..38c4d75c5149d461acc3240bb00832752be46876 100644 (file)
@@ -76,6 +76,7 @@ vpxdec.SRCS                 += tools_common.c tools_common.h
 vpxdec.SRCS                 += y4menc.c y4menc.h
 ifeq ($(CONFIG_LIBYUV),yes)
   vpxdec.SRCS                 += $(LIBYUV_SRCS)
+  $(BUILD_PFX)third_party/libyuv/%.cc.o: CXXFLAGS += -Wno-unused-parameter
 endif
 ifeq ($(CONFIG_WEBM_IO),yes)
   vpxdec.SRCS                 += $(LIBWEBM_COMMON_SRCS)
diff --git a/libs.mk b/libs.mk
index 9a6092a510316c5e64ae2a7dd5cd69ccbce3559c..6e12b54045484c1f01395fee8d88550ad02bb6da 100644 (file)
--- a/libs.mk
+++ b/libs.mk
@@ -106,9 +106,6 @@ ifeq ($(CONFIG_VP9_DECODER),yes)
   CODEC_DOC_SECTIONS += vp9 vp9_decoder
 endif
 
-VP9_PREFIX=vp9/
-$(BUILD_PFX)$(VP9_PREFIX)%.c.o: CFLAGS += -Wextra
-
 ifeq ($(CONFIG_ENCODERS),yes)
   CODEC_DOC_SECTIONS += encoder
 endif
@@ -116,6 +113,12 @@ ifeq ($(CONFIG_DECODERS),yes)
   CODEC_DOC_SECTIONS += decoder
 endif
 
+# Suppress -Wextra warnings in third party code.
+$(BUILD_PFX)third_party/googletest/%.cc.o: CXXFLAGS += -Wno-missing-field-initializers
+# Suppress -Wextra warnings in first party code pending investigation.
+# https://bugs.chromium.org/p/webm/issues/detail?id=1069
+$(BUILD_PFX)vp8/encoder/onyx_if.c.o: CFLAGS += -Wno-unknown-warning-option -Wno-clobbered
+$(BUILD_PFX)vp8/decoder/onyxd_if.c.o: CFLAGS += -Wno-unknown-warning-option -Wno-clobbered
 
 ifeq ($(CONFIG_MSVS),yes)
 CODEC_LIB=$(if $(CONFIG_STATIC_MSVCRT),vpxmt,vpxmd)