-
Notifications
You must be signed in to change notification settings - Fork 81
cypress5525: Correct a compiler warning #24
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
Conversation
This seems to be handling an error case incorrectly.
board/hx30/cypress5525.c: In function 'cyp5525_port_int':
board/hx30/cypress5525.c:974:9: error: this 'if' clause does not guard...
[-Werror=misleading-indentation]
974 | if (rv != EC_SUCCESS)
| ^~
board/hx30/cypress5525.c:976:17: note: ...this statement, but the latter
is misleadingly indented as if it were guarded by the 'if'
976 | print_pd_response_code(controller,
| ^~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Simon Glass <[email protected]>
|
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request |
|
This is possibly an incorrect fix. Looking at the same functionality in the hx20 branch, the offending line is just de-indented - EmbeddedController/board/hx20/cypress5525.c Line 973 in 38c1b38
If this is an actual issue, it needs to be resolved in the hx20 board too. |
storopoli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works in my i5 1240P thanks
Fixes the pd response print in the hx20 board, inline with the approved changes for hx30 at FrameworkComputer#24
Applies the Fix from FrameworkComputer#24 into the hx20 board.
Co-authored-by: Daniel Schaefer <[email protected]>
We actually always want to call print_pd_response_code for verbose debugging purposes, so we do not want to wrap this print in the error check
This seems to be handling an error case incorrectly.
board/hx30/cypress5525.c: In function 'cyp5525_port_int': board/hx30/cypress5525.c:974:9: error: this 'if' clause does not guard...
[-Werror=misleading-indentation]
974 | if (rv != EC_SUCCESS)
| ^~
board/hx30/cypress5525.c:976:17: note: ...this statement, but the latter
is misleadingly indented as if it were guarded by the 'if'
976 | print_pd_response_code(controller,
| ^~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Simon Glass [email protected]