-
Notifications
You must be signed in to change notification settings - Fork 2.3k
nodiscard ChipError Batch #19: platform-specific src: Darwin #42083
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
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.
Code Review
This pull request is part of a larger effort to address ignored ChipError return values, focusing on Darwin-specific platform code. The changes are well-executed and fall into a few categories:
- Most changes correctly introduce
TEMPORARY_RETURN_IGNOREDto explicitly acknowledge and suppress warnings for intentionally ignored function return values. This aligns with the goal of making the codebase compliant with[[nodiscard]]attributes. - Several changes are more than just warning suppression; they are valuable code improvements. For instance:
- In
MTROTAImageTransferHandler.mm, a potential bug involving an uninitialized variable being returned has been fixed. - In
MTROperationalCredentialsDelegate.mm, error handling has been added for a previously ignored return value fromreader.ExitContainer(). - In
MTRP256KeypairBridge.mmandMTRSessionResumptionStorageBridge.mm, the code has been refactored to useSetLength()and check its return value, which is cleaner and safer. - In
DnssdImpl.cpp,ChipDnssdStopBrowsenow correctly propagates the error fromctx->Finalize().
- In
All changes are beneficial, improving code correctness, robustness, and clarity. The pull request is a solid contribution to improving the overall quality of the codebase.
|
PR #42083: Size comparison from 4859b93 to 038453f Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
|
PR #42083: Size comparison from 4859b93 to 5a0b1fe Full report (6 builds for cc32xx, nrfconnect, realtek, stm32)
|
|
PR #42083: Size comparison from 4859b93 to 1976b8e Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
|
PR #42083: Size comparison from e123d28 to 4df1081 Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
Summary
Batch 19 of ignored ChipError for #41629
Related issues
#41629
Testing
CI
Readability checklist
The checklist below will help the reviewer finish PR review in time and keep the
code readable:
descriptive
“When in Rome…”
rule (coding style)
See: Pull Request Guidelines