Skip to content
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

kernel: avoid Boolean-to-integer type casts #73782

Conversation

tychofrei02
Copy link
Contributor

Avoid casting expression to an inappropriate essential type.

This corresponds to following coding guideline:

The value of an expression should not be cast to an inappropriate essential type

This PR is part of the enhancement issue #48002 which port the coding guideline fixes done by BUGSENG on the https://github.com/zephyrproject-rtos/zephyr/tree/v2.7-auditable-branch back to main

The commit in this PR is a subset of the original auditable-branch commit:
7eadb9c

Avoid casting expression to an inappropriate essential type.

Signed-off-by: frei tycho <tfrei@baumer.com>
@zephyrbot zephyrbot added area: Kernel Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. labels Jun 5, 2024
Copy link
Contributor

@andyross andyross left a comment

Choose a reason for hiding this comment

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

FWIW this one is an artifact of the syscall generation script not being able to represent booleans in the generated marshal code. Probably not worth demanding a real fix in a MISRA PR, but in case someone feels inspired...

@dleach02 dleach02 merged commit ec9f71e into zephyrproject-rtos:main Jun 5, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Kernel Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants