summaryrefslogtreecommitdiff
path: root/coreconf/Linux.mk
diff options
context:
space:
mode:
authorMartin Thomson <martin.thomson@gmail.com>2015-10-07 06:46:35 +0200
committerMartin Thomson <martin.thomson@gmail.com>2015-10-07 06:46:35 +0200
commit4620962287e073fd40f83cdb03654c5fb23d5291 (patch)
tree3ab774741a7ba04cc15ae39ebec3cb37d3abf6cc /coreconf/Linux.mk
parent51a32f480092770f6691c1cd82576d2781050f7f (diff)
downloadnss-hg-4620962287e073fd40f83cdb03654c5fb23d5291.tar.gz
Bug 1211725 - Enable more warnings, disable errors on sign-compare, r?kaie
Diffstat (limited to 'coreconf/Linux.mk')
-rw-r--r--coreconf/Linux.mk7
1 files changed, 4 insertions, 3 deletions
diff --git a/coreconf/Linux.mk b/coreconf/Linux.mk
index 2d25a7e8f..e1e50654b 100644
--- a/coreconf/Linux.mk
+++ b/coreconf/Linux.mk
@@ -134,7 +134,8 @@ ifeq ($(USE_PTHREADS),1)
OS_PTHREAD = -lpthread
endif
-OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -Wall -pipe -ffunction-sections -fdata-sections -DLINUX -Dlinux -DHAVE_STRERROR
+OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -pipe -ffunction-sections -fdata-sections -DLINUX -Dlinux -DHAVE_STRERROR
+OS_CFLAGS += -Wall -Wempty-body -Wpointer-to-int-cast -Wsign-compare -Wtype-limits
OS_LIBS = $(OS_PTHREAD) -ldl -lc
ifeq ($(COMPILER_TAG),_clang)
@@ -146,7 +147,7 @@ ifdef BUILD_OPT
# clang is unable to handle glib's expansion of strcmp and similar for optimized
# builds, so ignore the resulting errors.
# See https://llvm.org/bugs/show_bug.cgi?id=20144
-OS_CFLAGS += -Wno-array-bounds -Wno-unevaluated-expression
+OS_CFLAGS += -Wno-error=array-bounds -Wno-error=unevaluated-expression
endif
# Clang reports its version as an older gcc, but it's OK
NSS_HAS_GCC48 = true
@@ -161,7 +162,7 @@ NSS_HAS_GCC48 := $(shell \
export NSS_HAS_GCC48
endif
ifeq (true,$(NSS_HAS_GCC48))
-OS_CFLAGS += -Werror
+OS_CFLAGS += -Werror -Wno-error=sign-compare
else
# Old versions of gcc (< 4.8) don't support #pragma diagnostic in functions.
# Use this to disable use of that #pragma and the warnings it suppresses.