Skip to content

zephyr: fix build warning in CI tests#21

Open
pillo79 wants to merge 1 commit into
arduino-libraries:mainfrom
pillo79:pr-warning-fix
Open

zephyr: fix build warning in CI tests#21
pillo79 wants to merge 1 commit into
arduino-libraries:mainfrom
pillo79:pr-warning-fix

Conversation

@pillo79

@pillo79 pillo79 commented Jun 26, 2026

Copy link
Copy Markdown

Checking a constant non-zero value at runtime will always generate a warning: the address of xxx will never be null from the compiler. Instead, ensure the device is present using DT_NODE_HAS_STATUS_OKAY at compile time and provide a nicer feedback to the user.

@CLAassistant

CLAassistant commented Jun 26, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Checking a constant non-zero value at runtime will always generate a
"warning: the address of xxx will never be null" from the compiler.
Instead, ensure the device is present using DT_NODE_HAS_STATUS_OKAY at
compile time and provide a nicer feedback to the user.
@pillo79
pillo79 marked this pull request as ready for review June 26, 2026 17:17
@per1234 per1234 added the bug Something isn't working label Jun 27, 2026
@leonardocavagnis
leonardocavagnis requested a review from pennam June 29, 2026 07:45

@pennam pennam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM tested with bundled examples. Thanks @pillo79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants