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

Fix and enable warnings -Wunreachable-code #5070

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

mspang
Copy link
Contributor

@mspang mspang commented Mar 1, 2021

  • Fix or remove loops that run at most once
  • Add a quit variable in Android IO thread; otherwise the code after the
    loop is [more obviously] unreachable.
  • Don't use enums as test parameters that can only be changed by editing
    the test. Perhaps we shouldn't have these at all, but static constexpr
    triggers no diagnostics.

@github-actions
Copy link

github-actions bot commented Mar 1, 2021

Size increase report for "gn_qpg6100-example-build" from 8997367

File Section File VM
chip-qpg6100-lock-example.out .text 32 32
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-qpg6100-lock-example.out and ./pull_artifact/chip-qpg6100-lock-example.out:

sections,vmsize,filesize
.debug_line,0,55
.debug_loc,0,42
.text,32,32
.debug_frame,0,12
.debug_info,0,-5
.debug_ranges,0,-24
.debug_abbrev,0,-28
[Unmapped],0,-32


@mspang mspang force-pushed the for-chip/Wunreachable-code branch from 9d16160 to 425548a Compare March 1, 2021 11:34
- Fix or remove loops that run at most once
- Add a quit variable in Android IO thread; otherwise the code after the
  loop is [more obviously] unreachable.
- Don't use enums as test parameters that can only be changed by editing
  the test. Perhaps we shouldn't have these at all, but static constexpr
  triggers no diagnostics.
- Add some extra parens to suppress warning in commented out code.
@mspang mspang force-pushed the for-chip/Wunreachable-code branch from 425548a to 21fbed6 Compare March 1, 2021 22:40
@mspang mspang merged commit 347d6e9 into project-chip:master Mar 2, 2021
@mspang mspang deleted the for-chip/Wunreachable-code branch March 2, 2021 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants