ncroxon / ncroxon/gnu-efi

Option to disable -Werror

Open
#55 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
169
Forks
42
PR merge metrics
No merged PRs in 30d

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading Make.defaults and searching the CFLAGS definitions for existing -Werror uses. Check the project’s make invocation with and without WERROR; done means the default build does not force -Werror while WERROR=1 enables it for developer and CI builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
build-system
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.