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

logging: cmsis: prevent wundef warnings #72800

Conversation

Maravus
Copy link

@Maravus Maravus commented May 15, 2024

If -Werror is used compilation fails due to wundef warning.

If -Werror is used compilation fails due to wundef warning.

Signed-off-by: Christoph Schnetzler <[email protected]>
@Maravus Maravus force-pushed the gardena/cs/upstream/20240515-wundef-error branch from 5bce5e9 to b75940d Compare May 15, 2024 12:56
@Maravus Maravus marked this pull request as ready for review May 15, 2024 14:41
@zephyrbot zephyrbot added area: ARM ARM (32-bit) Architecture area: Logging labels May 15, 2024
@MaureenHelm
Copy link
Member

@nordic-krch @ithinuel please take a look

ithinuel
ithinuel previously approved these changes Jun 12, 2024
@@ -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
Copy link
Contributor

@nordic-krch nordic-krch Jun 13, 2024

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 #ifdefs 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 Maravus force-pushed the gardena/cs/upstream/20240515-wundef-error branch from 916f181 to 3530a6e Compare June 13, 2024 13:35
@aescolar aescolar added the bug The issue is a bug, or the PR is fixing a bug label Jun 17, 2024
@aescolar aescolar added this to the v3.7.0 milestone Jun 17, 2024
@aescolar aescolar merged commit 239c20d into zephyrproject-rtos:main Jun 17, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARM ARM (32-bit) Architecture area: Logging bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants