Skip to content

Commit

Permalink
osc-osd: Make all warnings Errors and have a clean build
Browse files Browse the repository at this point in the history
* 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 <bharrosh@panasas.com>
  • Loading branch information
Boaz Harrosh committed Nov 3, 2011
1 parent f2378b4 commit f8d1b45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion osd-target/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion osd-util/osd-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;
}

/*
Expand Down

0 comments on commit f8d1b45

Please sign in to comment.