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

Remove exit: return idiom from src/ble #7518

Merged
merged 1 commit into from
Jun 10, 2021

Conversation

kpschoedel
Copy link
Contributor

Problem

The Exit group of error-handling macros inhibit scoping, and
are unnecessary when there is no cleanup at the exit: label.

Change overview

  • Remove exit: return idiom from src/ble, replacing Exit macros
    with corresponding Return macros.

Testing

No change to functionality; existing tests should catch regressions.

#### Problem

The `Exit` group of error-handling macros inhibit scoping, and
are unnecessary when there is no cleanup at the `exit:` label.

#### Change overview

- Remove `exit: return` idiom from `src/ble`, replacing `Exit` macros
  with corresponding `Return` macros.

#### Testing

No change to functionality; existing tests should catch regressions.
timerErr = mBle->mSystemLayer->StartTimer(BLE_CONNECT_TIMEOUT_MS, HandleConnectTimeout, this);
VerifyOrExit(timerErr == CHIP_SYSTEM_NO_ERROR, err = BLE_ERROR_START_TIMER_FAILED);
const chip::System::Error timerErr = mBle->mSystemLayer->StartTimer(BLE_CONNECT_TIMEOUT_MS, HandleConnectTimeout, this);
VerifyOrReturnError(timerErr == CHIP_SYSTEM_NO_ERROR, BLE_ERROR_START_TIMER_FAILED);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file would benefit from error-code unification.

@woody-apple
Copy link
Contributor

Re-starting tests, but they looked like real failures/timeouts

@github-actions
Copy link

Size increase report for "esp32-example-build" from 63e9462

File Section File VM
chip-all-clusters-app.elf .flash.text -4 -4
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_ranges,0,168
.debug_str,0,2
.shstrtab,0,-2
.flash.text,-4,-4
.debug_aranges,0,-8
.symtab,0,-16
.debug_frame,0,-24
.strtab,0,-50
.debug_abbrev,0,-80
.debug_loc,0,-268
.debug_line,0,-450
.debug_info,0,-576

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize


@github-actions
Copy link

Size increase report for "gn_qpg6100-example-build" from 63e9462

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

Files found only in the build output:
    report.csv

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

sections,vmsize,filesize
.debug_ranges,0,136
[Unmapped],0,32
.debug_str,0,1
.debug_aranges,0,-8
.debug_frame,0,-28
.symtab,0,-32
.text,-32,-32
.debug_abbrev,0,-70
.debug_line,0,-314
.debug_info,0,-583
.debug_loc,0,-754

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

BLOAT EXECUTION FAILED WITH CODE 1:
bloaty: unknown file type for file './pull_artifact/chip-qpg6100-lighting-example.out.map'


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from 63e9462

File Section File VM
chip-lock.elf text -32 -32
chip-shell.elf device_handles -8 -8
chip-shell.elf text -40 -40
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_ranges,0,136
.debug_aranges,0,-8
.debug_frame,0,-28
.symtab,0,-32
text,-32,-32
.debug_abbrev,0,-70
.debug_line,0,-319
.debug_info,0,-583
.debug_loc,0,-720

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_ranges,0,136
.shstrtab,0,-2
.debug_aranges,0,-8
device_handles,-8,-8
.debug_frame,0,-28
.symtab,0,-32
text,-40,-40
.strtab,0,-50
.debug_abbrev,0,-70
.debug_line,0,-319
.debug_info,0,-583
.debug_loc,0,-720


@bzbarsky-apple bzbarsky-apple merged commit 23f37bf into project-chip:master Jun 10, 2021
@kpschoedel kpschoedel deleted the error-macros branch June 14, 2021 15:34
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
#### Problem

The `Exit` group of error-handling macros inhibit scoping, and
are unnecessary when there is no cleanup at the `exit:` label.

#### Change overview

- Remove `exit: return` idiom from `src/ble`, replacing `Exit` macros
  with corresponding `Return` macros.

#### Testing

No change to functionality; existing tests should catch regressions.
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.

5 participants