replace a non-working #error statement with a working _Static_assert statement #440
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The following doesn't work like the author intended:
#define WIFI_INIT_CONFIG_DEFAULT #error Wifi is disabled in config, WIFI_INIT_CONFIG_DEFAULT will not work
Instead of making the compiler print "Wifi is disabled in config,.." and exit, it causes a long confusing error like:
To me, it seems that if anyone includes
esp_wifi.h
without enabling wifi in the config, then that is an error. I can't imagine a situation where someone wants wifi struct definitions without intending to use wifi, but it's a possibility. Does anyone do that?