Skip to content

Option to disable -Werror #55

@rossburton

Description

@rossburton

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions