Skip to content

Commit

Permalink
Remove -Wshadow -Wjump-misses-init -Wundef
Browse files Browse the repository at this point in the history
Doing this now specifically because clang does not have
-Wjump-misses-init, but I've been looking for an excuse to remove these
for a while.

These warning flags create more annoyance than they add value. There is
probably a reason they aren't included in -Wall + -Wextra.

-Wshadow specifically is potentially harmful as it forces coming up with
new, sometimes less descriptive names for repeated variables.

Dependent projects should use different flags for their dependencies if
this introduces problems.
  • Loading branch information
geky committed Sep 7, 2022
1 parent 2374762 commit 30175de
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ override CFLAGS += -DLFS_YES_TRACE
endif
override CFLAGS += -g3
override CFLAGS += -I.
override CFLAGS += -std=c99 -Wall -pedantic
override CFLAGS += -Wextra -Wshadow -Wjump-misses-init -Wundef
override CFLAGS += -std=c99 -Wall -Wextra -pedantic

ifdef VERBOSE
override TESTFLAGS += -v
Expand Down

0 comments on commit 30175de

Please sign in to comment.