-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix CASE invalid error expressions #10064
Fix CASE invalid error expressions #10064
Conversation
- Some VerifyOrExit did not set `err = ` properly in the macro, which dropped errors to the floor and raised warnings for some. - Added `err = XXX` where missing in VerifyOrExist calls Testing done: ran all unit tests
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.
Great catch!
I run the following regex: VerifyOrExit\((.*), CHIP_ERROR
and see two other files "infected" (unless not done intentionally):
- https://github.com/project-chip/connectedhomeip/blob/master/src/controller/CHIPDeviceController.cpp#L915
- https://github.com/project-chip/connectedhomeip/blob/master/src/platform/mbed/BLEManagerImpl.cpp#L624
- https://github.com/project-chip/connectedhomeip/blob/master/src/platform/mbed/BLEManagerImpl.cpp#L790
- https://github.com/project-chip/connectedhomeip/blob/master/src/platform/mbed/BLEManagerImpl.cpp#L817
- https://github.com/project-chip/connectedhomeip/blob/master/src/platform/mbed/BLEManagerImpl.cpp#L1031
I fixed those too. Thanks for catching! |
@tcarmelveilleux Needs rebase |
How about we just add lints for this, since compiler warnings are not doing it? Something like so:
I can do a followup for that once this PR lands. |
Maybe we could use
|
We could; we would need to change the existing places that do |
Size increase report for "gn_qpg-example-build" from 40ac48e
Full report output
|
Size increase report for "nrfconnect-example-build" from 40ac48e
Full report output
|
Should prevent re-introduction of the sort of errors project-chip#10064 fixed.
Should prevent re-introduction of the sort of errors project-chip#10064 fixed.
Should prevent re-introduction of the sort of errors project-chip#10064 fixed.
Should prevent re-introduction of the sort of errors #10064 fixed.
Problem
err =
properly in themacro, which dropped errors to the floor and raised
warnings for some.
Change overview
err = XXX
where missing in VerifyOrExist callsTesting
Testing done: ran all unit tests