mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-30 13:00:30 +00:00
Fix -W options so flex/yacc code compiles completely without warnings. Also,
Use -Wundef everywhere except flex/yacc code, specifically. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4794 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
ab0e8eb731
commit
e95e7694f5
2 files changed
+12
-4
No files matched your search
@@ -141,13 +141,13 @@ endif
|
||||
ifeq ($(WARN),1)
|
||||
ALL_CFLAGS += -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \
|
||||
-Wcast-align -Wwrite-strings -Wnested-externs -Winline -W \
|
||||
-Wmissing-prototypes
|
||||
-Wmissing-prototypes -Wundef
|
||||
endif
|
||||
|
||||
ALL_CPPFLAGS += $(CPPFLAGS)
|
||||
ALL_CFLAGS += $(CFLAGS)
|
||||
|
||||
PROGCPPFLAGS := -DETCDIR="\"$(ETCDIR)\"" $(ALL_CPPFLAGS) -Wundef
|
||||
PROGCPPFLAGS := -DETCDIR="\"$(ETCDIR)\"" $(ALL_CPPFLAGS)
|
||||
PROGCFLAGS := $(ALL_CFLAGS)
|
||||
ARCPPFLAGS := $(ALL_CPPFLAGS)
|
||||
ARCFLAGS := $(ALL_CFLAGS)
|
||||
|
||||
+10
-2
@@ -85,10 +85,18 @@ $(MODULE_DIR)/conf-parse.h: $(MODULE_DIR)/conf-parse.c
|
||||
INCLUDEFILES += $(LIBCSOURCES:.c=.ld) $(LIBCSOURCES:.c=.ad)
|
||||
|
||||
# Special warning prevention for flex-generated files
|
||||
FLEXNOWARN:=-Wno-shadow -Wno-undef -Wno-unused -Wno-missing-prototypes
|
||||
$(MODULE_DIR)/conf-lex.ao: $(MODULE_DIR)/conf-lex.c
|
||||
$(CC) $(ARCPPFLAGS) $(ARCFLAGS) -Wno-unused -Wno-missing-prototypes -c $< -o $@
|
||||
$(CC) $(ARCPPFLAGS) $(ARCFLAGS) $(FLEXNOWARN) -c $< -o $@
|
||||
$(MODULE_DIR)/conf-lex.lo: $(MODULE_DIR)/conf-lex.c
|
||||
$(CC) $(LIBCPPFLAGS) $(LIBCFLAGS) -Wno-unused -Wno-missing-prototypes -c $< -o $@
|
||||
$(CC) $(LIBCPPFLAGS) $(LIBCFLAGS) $(FLEXNOWARN) -c $< -o $@
|
||||
|
||||
# Special warning prevention for bison-generated files
|
||||
YACCNOWARN:=-Wno-undef
|
||||
$(MODULE_DIR)/conf-parse.ao: $(MODULE_DIR)/conf-parse.c
|
||||
$(CC) $(ARCPPFLAGS) $(ARCFLAGS) $(YACCNOWARN) -c $< -o $@
|
||||
$(MODULE_DIR)/conf-parse.lo: $(MODULE_DIR)/conf-parse.c
|
||||
$(CC) $(LIBCPPFLAGS) $(LIBCFLAGS) $(YACCNOWARN) -c $< -o $@
|
||||
|
||||
REMOVELIBST := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(LIBDIR)/%,$(LIB_DIR)/$(LIBSTLIBNAME))
|
||||
REMOVELIBSH := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(LIBDIR)/%,$(LIB_DIR)/$(LIBSHLIBNAME))
|
||||
|
||||
Reference in new issue
Block a user