Skip to content

modem: pipelink: silence warning in modem_pipelink_is_connected #93464

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

petrosyan-van
Copy link
Contributor

@petrosyan-van petrosyan-van commented Jul 21, 2025

Initialize local variable connected to false to quiet the GCC warning

/Users/vanpetrosyan/Projects/scs-firmware/zephyr/subsys/modem/modem_pipelink.c: In function 'modem_pipelink_is_connected':
/Users/vanpetrosyan/Projects/scs-firmware/zephyr/subsys/modem/modem_pipelink.c:36:16: warning: 'connected' may be used uninitialized [-Wmaybe-uninitialized]
   36 |         return connected;
      |                ^~~~~~~~~
/Users/vanpetrosyan/Projects/scs-firmware/zephyr/subsys/modem/modem_pipelink.c:30:14: note: 'connected' was declared here
   30 |         bool connected;

@petrosyan-van petrosyan-van force-pushed the modem_pipelink_warning branch from 659a19f to b76c3c6 Compare July 21, 2025 19:21
@zephyrbot zephyrbot added size: XS A PR changing only a single line of code area: Modem labels Jul 21, 2025
@petrosyan-van petrosyan-van force-pushed the modem_pipelink_warning branch from b76c3c6 to 7ad6a62 Compare July 21, 2025 19:22
Copy link
Contributor

@bjarki-andreasen bjarki-andreasen left a comment

Choose a reason for hiding this comment

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

Thanks :) The compiler does not understand the K_SPINLOCK macro...

The CI failure is unrelated

Copy link
Contributor

@tomi-font tomi-font left a comment

Choose a reason for hiding this comment

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

Rebase on the latest main to (hopefully) fix the unrelated CI failure.

Initialize local variable `connected` to false to suppress the GCC warning.

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
@petrosyan-van petrosyan-van force-pushed the modem_pipelink_warning branch from 7ad6a62 to 57c6da1 Compare July 22, 2025 11:58
Copy link

@petrosyan-van
Copy link
Contributor Author

Rebase on the latest main to (hopefully) fix the unrelated CI failure.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Modem size: XS A PR changing only a single line of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants