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

arch: coding guidelines: add explicit cast to void #72066

Conversation

tychofrei02
Copy link
Contributor

@tychofrei02 tychofrei02 commented Apr 29, 2024

Added explicit cast to void when returned value is expectedly ignored.

This corresponds to following coding guideline:

The value returned by a function having non-void return type shall be used

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:
f77c7bb

@zephyrbot zephyrbot added Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. area: X86 x86 Architecture (32-bit) labels Apr 29, 2024
@jhedberg
Copy link
Member

@tychofrei02 could you try to not modify the coding style, i.e. have the split line correctly aligned after the opening parenthesis of the first line?

@tychofrei02 tychofrei02 force-pushed the misra_rule_17_7_auditable_to_main_in_arch branch from 9efbc1a to 76d21e7 Compare April 29, 2024 10:32
@tychofrei02
Copy link
Contributor Author

@tychofrei02 could you try to not modify the coding style, i.e. have the split line correctly aligned after the opening parenthesis of the first line?

@jhedberg Fixed that.

jhedberg
jhedberg previously approved these changes Apr 30, 2024
@tychofrei02 tychofrei02 changed the title coding guidelines: comply with MISRA C:2012 Rule 17.7 in arch arch: coding guidelines: add explicit cast to void Apr 30, 2024
kartben
kartben previously approved these changes May 3, 2024
- added explicit cast to void when returned value is expectedly ignored

Signed-off-by: frei tycho <tfrei@baumer.com>
@tychofrei02 tychofrei02 dismissed stale reviews from kartben and jhedberg via 3663054 May 3, 2024 13:46
@tychofrei02 tychofrei02 force-pushed the misra_rule_17_7_auditable_to_main_in_arch branch from 76d21e7 to 3663054 Compare May 3, 2024 13:46
@jhedberg jhedberg merged commit 3068179 into zephyrproject-rtos:main May 4, 2024
18 checks passed
@tychofrei02 tychofrei02 deleted the misra_rule_17_7_auditable_to_main_in_arch branch May 16, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: X86 x86 Architecture (32-bit) 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.

4 participants