Skip to content

wiseconnect: sl_utility: drop the no-op fflush() - #192

Open
kartben wants to merge 1 commit into
zephyrproject-rtos:mainfrom
kartben:siwx917-drop-noop-fflush
Open

kartben wants to merge 1 commit into
zephyrproject-rtos:mainfrom
kartben:siwx917-drop-noop-fflush

Conversation

@kartben

@kartben kartben commented Sep 17, 2026

Copy link
Copy Markdown
Member

print_sl_ipv4_address() calls fflush(stdout), but Zephyr's stdout is unbuffered under both libcs — minimal libc's zephyr_fputc() goes straight to _stdout_hook(), and picolibc sets up __stdout as FDEV_SETUP_STREAM(picolibc_put, NULL, NULL, 0), a null buffer. The flush does nothing.

More importantly, minimal libc declares no fflush() and has no implementation, so the implicit declaration is fatal under -Werror. This breaks cpp.main.minimal on siwx917_ek2708a, siwx917_rb4342a, siwx917_dk2605a and siwx917_rb4338a (the scenario sets CONFIG_PM=y, which selects SILABS_SIWX91X_NWP and pulls sl_utility.c into the build).

print_sl_ipv6_address() right below does not flush, so the file is already inconsistent :)

Zephyr's stdout is unbuffered under both libcs: minimal libc's
zephyr_fputc() calls _stdout_hook() directly, and picolibc sets up
__stdout as FDEV_SETUP_STREAM() with a null buffer. So the flush does
nothing, while minimal libc declares no fflush() and the implicit
declaration breaks the build with -Werror. print_sl_ipv6_address()
does not flush either.

Upstream-status: Pending
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5
@kartben
kartben force-pushed the siwx917-drop-noop-fflush branch from 1463399 to ab8384b Compare September 17, 2026 09:07
kartben added a commit to kartben/zephyr that referenced this pull request Sep 17, 2026
Pull in zephyrproject-rtos/hal_silabs#192, which drops a no-op
fflush() that minimal libc cannot declare.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5
kartben added a commit to kartben/zephyr that referenced this pull request Sep 18, 2026
Pull in zephyrproject-rtos/hal_silabs#192, which drops a no-op
fflush() that minimal libc cannot declare.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5

@jerome-pouiller jerome-pouiller left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We try to automate the integration of the version of wiseconnect/sisdk. So, could you start the title with "wiseconnect: Patch ".

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