-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Forcing -Werror is bad practise as you have no idea what compiler the user has and what it considers warnings. Notably every new release of GCC add more warnings and suddenly code that used to compile now fails.
However I absolutely agree that developers and CI should run with -Werror to catch all warnings.
I suggest that the use of -Werror should be optional, maybe something like this in Make.defaults:
ifneq ($(WERROR),1)
WERROR=-Werror
else
WERROR=
endif
And then in CFLAGS replace -Werror with $(WERROR). Developers and CI can then do WERROR=1, but everyone else doesn't get spontaneous failures when a piece of the system changes and gnu-efi no longer builds without warnings.
fabio-porcedda
Metadata
Metadata
Assignees
Labels
No labels