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.
Forcing
-Werroris 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
-Werrorto catch all warnings.I suggest that the use of
-Werrorshould be optional, maybe something like this inMake.defaults:And then in
CFLAGSreplace-Werrorwith$(WERROR). Developers and CI can then doWERROR=1, but everyone else doesn't get spontaneous failures when a piece of the system changes and gnu-efi no longer builds without warnings.