Skip to content

clean(zephyr): reduce warnings on zephyr platform#4860

Merged
lum1n0us merged 2 commits intobytecodealliance:mainfrom
project-ocre:fix/reduce-warnings-zephyr
Mar 5, 2026
Merged

clean(zephyr): reduce warnings on zephyr platform#4860
lum1n0us merged 2 commits intobytecodealliance:mainfrom
project-ocre:fix/reduce-warnings-zephyr

Conversation

@kr-t
Copy link
Contributor

@kr-t kr-t commented Mar 3, 2026

Minimal changes to reduce warnings on Zephyr's side.
This PR fixes "MIN" redefinition, as well as [-Wsign-compare] warnings.

I recommend we merge this as two separate commits, but it's fine with me if we decide to squash them.
I added explanations both in commit messages and comments.

buf_len is a long unsigned int, while bytes_* can be negative due to error values.
We don't need to check bytes_* for negative value, as it was done during read/write op.

Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
Some platforms, like Zephyr, already define MIN and definition in WAMR cause
`warning: "MIN" redefined` warning.
Check if it was defined before, and do not redefine it.

Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
@kr-t kr-t force-pushed the fix/reduce-warnings-zephyr branch from 07af943 to e01e6b1 Compare March 3, 2026 12:59
@kr-t kr-t changed the title Fix/reduce warnings zephyr clean(zephyr): reduce warnings on zephyr platform Mar 3, 2026
@lum1n0us lum1n0us added the bug-fix Determine if this PR addresses a bug. It will be used by scripts to classify PRs. label Mar 4, 2026
@lum1n0us lum1n0us merged commit fa7c2d3 into bytecodealliance:main Mar 5, 2026
504 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix Determine if this PR addresses a bug. It will be used by scripts to classify PRs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants