From f8d1b4514c882fbe792b1f425416faa5cba72b74 Mon Sep 17 00:00:00 2001 From: Boaz Harrosh Date: Wed, 2 Nov 2011 18:12:22 -0700 Subject: [PATCH] osc-osd: Make all warnings Errors and have a clean build * Add the -Werror to the flags. We need a clean compilation * Fix a warning in get_mhz() which was actually an error. good catch gcc, thanks Signed-off-by: Boaz Harrosh --- osd-target/Makefile | 2 +- osd-util/osd-util.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osd-target/Makefile b/osd-target/Makefile index 8f868a2..75df94a 100644 --- a/osd-target/Makefile +++ b/osd-target/Makefile @@ -45,7 +45,7 @@ COPTS := $(OPT) COPTS += -fPIC -foptimize-sibling-calls -D_GNU_SOURCE CWARN := -Wall -W -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual \ -Wbad-function-cast -Wundef -Wmissing-prototypes \ - -Wmissing-declarations -Wnested-externs + -Wmissing-declarations -Wnested-externs -Werror CFLAGS += $(COPTS) $(CWARN) -I.. -Wno-unused -I../osd-util ifeq ($(PVFS_OSD_INTEGRATED),1) diff --git a/osd-util/osd-util.c b/osd-util/osd-util.c index 7ad992f..b927d6e 100644 --- a/osd-util/osd-util.c +++ b/osd-util/osd-util.c @@ -693,7 +693,7 @@ double get_mhz(void) fclose(fp); #endif /* else defined(__FreeBSD__) || defined(__APPLE__) */ - return mhz != 0 ?: cpufrequency_not_found ; + return mhz != 0 ? mhz : cpufrequency_not_found ; } /*