From 508c39ee133d6725a4440ba98a1555e2026975c2 Mon Sep 17 00:00:00 2001 From: Martin Maly Date: Wed, 6 May 2015 13:18:33 -0700 Subject: Resolve compilation errors if compiled with more stringent semantic checks. Adding Travis test to build with strict warnings. Fixing a warning in a test which used signed/unsigned integer comparison. --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8af52d4..5887fbe 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,10 @@ USER_CPPFLAGS= # Build with "make WITH_JIT=yes" (or anything besides "no") to enable the JIT. WITH_JIT=no +# Build with "make WITH_MAX_WARNINGS=yes" (or anything besides "no") to enable +# with strict warnings and treat warnings as errors. +WITH_MAX_WARNINGS=no + # Basic compiler/flag setup. CC=cc CXX=c++ @@ -53,6 +57,10 @@ ifneq ($(WITH_JIT), no) CPPFLAGS += -DUPB_USE_JIT_X64 endif +ifneq ($(WITH_MAX_WARNINGS), no) + WARNFLAGS=-Wall -Wextra -Wpointer-arith -Werror +endif + # Build with "make Q=" to see all commands that are being executed. Q=@ -- cgit v1.2.3