Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to disable -Werror #55

Open
rossburton opened this issue Nov 28, 2024 · 0 comments
Open

Option to disable -Werror #55

rossburton opened this issue Nov 28, 2024 · 0 comments

Comments

@rossburton
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant