build: enable more compiler warnings

Summary:
* Makefile (WARNING_FLAGS): Add -W and -Wextra, and at least for now,
-Wno-unused-parameter.  Without that latter one, there would be
many errors/warnings about unused parameters.

Test Plan:
run these and ensure there is no warning:
  make clean && make
  make clean && USE_CLANG=1 make

Reviewers: ljin, sdong, igor.sugak, igor

Reviewed By: igor

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D33819
This commit is contained in:
Jim Meyering 2015-02-19 16:45:32 -08:00
parent a2b911b63f
commit 4f514a53d6

View File

@ -124,7 +124,9 @@ install:
[ ! -e $(SHARED) ] || install -C -m 644 $(SHARED) $(INSTALL_PATH)/lib
#-------------------------------------------------
WARNING_FLAGS = -Wall -Werror -Wsign-compare -Wshadow
WARNING_FLAGS = -W -Wextra -Wall -Werror -Wsign-compare -Wshadow \
-Wno-unused-parameter
CFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CCFLAGS) $(OPT)
CXXFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) -Woverloaded-virtual -Wnon-virtual-dtor