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

[v2.7] cannot use CONFIG_COMPILER_WARNINGS_AS_ERRORS #66500

Closed
cfriedt opened this issue Dec 13, 2023 · 2 comments
Closed

[v2.7] cannot use CONFIG_COMPILER_WARNINGS_AS_ERRORS #66500

cfriedt opened this issue Dec 13, 2023 · 2 comments
Assignees
Labels
area: Build System area: Toolchains Toolchains area: Twister Twister bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@cfriedt
Copy link
Member

cfriedt commented Dec 13, 2023

Describe the bug
It would be nice to have a stable way of configuring whether warnings are promoted to errors in LTSv2.

Please also mention any information which could help others to understand
the problem you're facing:

To Reproduce
Steps to reproduce the behavior:

  1. git checkout origin/v2.7-branch
  2. west build -p auto -t run samples/hello_world -- -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
  3. See (build) error due to undefined Kconfig option
  4. add an unused variable in samples/hello_world/src/main.c
  5. apply change in linked PR
  6. see expected error when building (due to warning being promoted to error).

Expected behavior

  • Build should succeed (there are no warnings in hello_world
  • Warnings should be promoted to errors.

Impact
What impact does this issue have on your progress (e.g., annoyance, showstopper)

Logs and console output
Build error because Kconfig option is not defined

 warning: attempt to assign the value 'y' to the undefined symbol COMPILER_WARNINGS_AS_ERRORS

Expected error when promoting warnings to errors

error: unused variable 'foo' [-Werror=unused-variable]

Environment (please complete the following information):

  • OS: Any
  • Toolchain: Zephyr SDK v0.14.2
  • Commit SHA: e677cfd

Additional context
Helpful for those migrating from LTSv2 to (pre) LTSv3

@cfriedt cfriedt added the bug The issue is a bug, or the PR is fixing a bug label Dec 13, 2023
@cfriedt cfriedt added the priority: low Low impact/importance bug label Dec 13, 2023
@cfriedt cfriedt changed the title [v2.7-branch] cannot use CONFIG_COMPILER_WARNINGS_AS_ERRORS [v2.7] cannot use CONFIG_COMPILER_WARNINGS_AS_ERRORS Dec 13, 2023
@cfriedt cfriedt assigned cfriedt and unassigned tejlmand Dec 13, 2023
@stephanosio
Copy link
Member

It would be nice to have a stable way of configuring whether warnings are promoted to errors in LTSv2.

That sounds more like an enhancement than a bug.

@cfriedt
Copy link
Member Author

cfriedt commented Dec 24, 2023

Fixed by #66501

@cfriedt cfriedt closed this as completed Dec 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System area: Toolchains Toolchains area: Twister Twister bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

3 participants