From c3a135b5b88910ce9ebba7261b0284d3a39df2a2 Mon Sep 17 00:00:00 2001 From: Johann Date: Tue, 13 Sep 2016 14:01:38 -0700 Subject: [PATCH] Expand -Wextra to more of the library Suppress warnings in third_party/. vp8 -Wclobbered issue is tracked here: BUG=webm:1246 BUG=webm:1069 Change-Id: I9b94bf546d7b690c26a59ae67967facdce8ec45b --- configure | 5 +++++ examples.mk | 1 + libs.mk | 9 ++++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 95af2e3..27ec8d9 100755 --- 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 diff --git a/examples.mk b/examples.mk index cc7fb1d..38c4d75 100644 --- a/examples.mk +++ b/examples.mk @@ -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 9a6092a..6e12b54 100644 --- 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) -- 2.7.4