-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
logging: cmsis: prevent wundef warnings #72800
Merged
aescolar
merged 2 commits into
zephyrproject-rtos:main
from
husqvarnagroup:gardena/cs/upstream/20240515-wundef-error
Jun 17, 2024
Merged
logging: cmsis: prevent wundef warnings #72800
aescolar
merged 2 commits into
zephyrproject-rtos:main
from
husqvarnagroup:gardena/cs/upstream/20240515-wundef-error
Jun 17, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If -Werror is used compilation fails due to wundef warning. Signed-off-by: Christoph Schnetzler <[email protected]>
Maravus
force-pushed
the
gardena/cs/upstream/20240515-wundef-error
branch
from
May 15, 2024 12:56
5bce5e9
to
b75940d
Compare
zephyrbot
requested review from
dcpleung,
microbuilder,
nordic-krch,
povergoing and
stephanosio
May 15, 2024 14:42
@nordic-krch @ithinuel please take a look |
ithinuel
previously approved these changes
Jun 12, 2024
nordic-krch
reviewed
Jun 13, 2024
include/zephyr/logging/log_core.h
Outdated
@@ -197,7 +197,7 @@ static inline char z_log_minimal_level_to_char(int level) | |||
* emitted instead. String check may increase compilation time so it is not | |||
* always performed (could significantly increase CI time). | |||
*/ | |||
#if CONFIG_LOG_FMT_STRING_VALIDATE | |||
#if defined(CONFIG_LOG_FMT_STRING_VALIDATE) && CONFIG_LOG_FMT_STRING_VALIDATE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be enough to have:
#ifdef CONFIG_LOG_FMT_STRING_VALIDATE
It is used that way across the repo and any #if
were changed to #ifdef
s for kconfig bools.
Example: #72073
Maravus
pushed a commit
to husqvarnagroup/zephyr
that referenced
this pull request
Jun 13, 2024
If -Werror is used compilation fails due to wundef warning. PR: zephyrproject-rtos#72800 Signed-off-by: Christoph Schnetzler <[email protected]> (cherry picked from commit b75940d)
use #ifdef to avoid to use undefined macros in #if expressions Signed-off-by: Christoph Schnetzler <[email protected]>
Maravus
force-pushed
the
gardena/cs/upstream/20240515-wundef-error
branch
from
June 13, 2024 13:35
916f181
to
3530a6e
Compare
ithinuel
approved these changes
Jun 17, 2024
nordic-krch
approved these changes
Jun 17, 2024
aescolar
approved these changes
Jun 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
If -Werror is used compilation fails due to wundef warning.