Add compiler warning flag -Wextra and fix related warnings.
Note: some of these warnings are enabled by a combination of -Wunused (added earlier) and -Wextra. Cherry-picked from aomedia/master: 4790a69 Change-Id: I322a1366bd4fd6c0dec9e758c2d5e88e003b1cbf
This commit is contained in:
4
configure
vendored
4
configure
vendored
@@ -617,6 +617,10 @@ process_toolchain() {
|
||||
check_add_cflags -Wuninitialized
|
||||
check_add_cflags -Wunused
|
||||
check_add_cflags -Wsign-compare
|
||||
# Enabling the following warning (in combination with -Wunused above)
|
||||
# for C++ generates errors in third_party code including googletest and
|
||||
# libyuv. So enable it only for C code.
|
||||
check_cflags "-Wextra" && add_cflags_only "-Wextra"
|
||||
# Enabling the following warning for C++ generates some useless warnings
|
||||
# about some function parameters shadowing class member function names.
|
||||
# So, only enable this warning for C code.
|
||||
|
||||
Reference in New Issue
Block a user