Skip to content

Conversation

@tinegachris
Copy link

Summary

This PR fixes compiler warnings in the Rust blinky sample by moving imports inside the conditional compilation blocks where they are actually used.

Problem

When building the blinky sample for targets without an led0 device tree alias (like qemu_riscv32), the compiler generates warnings about unused imports:

Solution

Move the imports (ZR_GPIO_OUTPUT_ACTIVE, sleep, Duration) inside the #[cfg(dt = "aliases::led0")] conditional block where they are actually used.

Changes Made

  • Moved use zephyr::raw::ZR_GPIO_OUTPUT_ACTIVE; inside #[cfg(dt = "aliases::led0")] block
  • Moved use zephyr::time::{sleep, Duration}; inside #[cfg(dt = "aliases::led0")] block
  • No functional changes to the logic

Copy link
Collaborator

@d3zd3z d3zd3z left a comment

Choose a reason for hiding this comment

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

Ahh, I missed that the PR needs a signed-off-by in the commit. This should be checked by CI, and I'm investigating why the workflows didn't run for this change.

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

Successfully merging this pull request may close these issues.

2 participants