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

-Wundef - no default for OPENTHREAD_ENABLE_VENDOR_EXTENSION/OPENTHREAD_EXAMPLES_SIMULATION #9629

Open
tima-q opened this issue Nov 21, 2023 · 1 comment

Comments

@tima-q
Copy link
Contributor

tima-q commented Nov 21, 2023

Describe the bug
When using the -Wundef flag the following flags show up to have no default:

  • OPENTHREAD_ENABLE_VENDOR_EXTENSION
  • OPENTHREAD_EXAMPLES_SIMULATION
  • OPENTHREAD_CONFIG_PLATFORM_BOOTLOADER_MODE_ENABLE

Blocks using -Werror in a build + currently these flags need to be added as dummy 0 in a config .h

To Reproduce Information to reproduce the behavior, including:

  1. Was added a very long time ago
  2. IEEE 802.15.4 hardware platform - any
  3. Build steps - normal build with none of the mentioned flags in the configuration header
  4. Network topology - NA

Expected behavior
Build does not throw 'undefined' warning

Additional context
There is no default for the mentioned flags defined in code. The define is only generated in CMake options - also no fallback there to 0. Adding a #if !defined construction as done for other config's in the common headers would fix this

@tima-q tima-q changed the title -Wundef - no default for OPENTHREAD_ENABLE_VENDOR_EXTENSION -Wundef - no default for OPENTHREAD_ENABLE_VENDOR_EXTENSION/OPENTHREAD_EXAMPLES_SIMULATION Nov 21, 2023
@thcu-gp
Copy link
Contributor

thcu-gp commented Dec 12, 2023

Is it an option to enable this -Wundef by default with warnings as errors so these get fixed immediately when new flags are added?

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

2 participants