From a8e92ea7aa4978a2be43964ce31432ac5fb43929 Mon Sep 17 00:00:00 2001 From: Jon Medhurst Date: Mon, 14 May 2012 11:28:08 +0100 Subject: gator-daemon: Fix sequence-point compile error In mxml/mxml-file.c in the expression: (getc(fp) << 8) | getc(fp) the C standard allows right-hand getc() to be called before left hand one, which would cause a bug. The compiler gives an warning about this and we are treating warnings as errors this breaks the build with: error: operation on 'fp->_r' may be undefined [-Werror=sequence-point] We can fix this by rewriting the expressions in two parts, however the code in question has licensing clauses for modified versions which have not yet been resolved. Therefore, for now, we will disable the problematic error in the makefiles. Signed-off-by: Jon Medhurst --- tools/gator/daemon/Android.mk | 2 +- tools/gator/daemon/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/gator/daemon/Android.mk b/tools/gator/daemon/Android.mk index 3ab55b91ad55..715e5b62ba1b 100755 --- a/tools/gator/daemon/Android.mk +++ b/tools/gator/daemon/Android.mk @@ -3,7 +3,7 @@ include $(CLEAR_VARS) $(shell cd $(LOCAL_PATH);cat events_header.xml events-*\.xml events_footer.xml > events.xml;xxd -i events.xml > events_xml.h;xxd -i configuration.xml > configuration_xml.h) -LOCAL_CFLAGS += -Wall -O3 -ftree-vectorize +LOCAL_CFLAGS += -Wall -O3 -ftree-vectorize -Wno-error=sequence-point LOCAL_SRC_FILES:= \ CapturedXML.cpp \ diff --git a/tools/gator/daemon/Makefile b/tools/gator/daemon/Makefile index 950e87060ac2..c517a8737286 100644 --- a/tools/gator/daemon/Makefile +++ b/tools/gator/daemon/Makefile @@ -18,7 +18,7 @@ GCC=$(CROSS_COMPILE)gcc # -std=c++98 is the 1998 c++ standard # -march=armv5t is required to set the minimum architecture # -mthumb-interwork is required for interworking to ARM or Thumb stdlibc -CFLAGS=-O3 -Wall -Werror +CFLAGS=-O3 -Wall -Werror -Wno-error=sequence-point TARGET=gatord C_SRC = $(wildcard mxml/*.c) CPP_SRC = $(wildcard *.cpp) -- cgit v1.2.3