Skip to content

Fix -Wshadow warnings in library sources (#169) - #5

Closed
zakoverflow wants to merge 1 commit into
masterfrom
xerj-ab2/without-xerj
Closed

zakoverflow wants to merge 1 commit into
masterfrom
xerj-ab2/without-xerj

Conversation

@zakoverflow

Copy link
Copy Markdown
Owner

Addresses the shadowing part of blues#169. Renames 8 shadowing locals (7 in n_helpers.c, 1 in n_i2c.c); behavior unchanged. Adds -Wshadow to the note_c unit-test target (with -Werror) as a regression guard.

Blast radius: local variable renames only, plus a test-only compile flag. No public API, ABI, or runtime behavior change.

Verification: gcc -fsyntax-only -Wshadow -I. n_*.c -> 0 warnings (was 8). ./scripts/run_unit_tests.sh: 166/166 pass.

Rename shadowing locals (err -> errStr, inner req -> putReq) in
n_helpers.c and n_i2c.c. No behavior change. Add -Wshadow to the
note_c unit-test target so new shadowing fails the build.
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 38460624123

Coverage remained the same at 93.408%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 1 uncovered change across 1 file (27 of 28 lines covered, 96.43%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
n_helpers.c 25 24 96.0%
Total (2 files) 28 27 96.43%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 2611
Covered Lines: 2526
Line Coverage: 96.74%
Relevant Branches: 1409
Covered Branches: 1229
Branch Coverage: 87.22%
Branches in Coverage %: Yes
Coverage Strength: 80.3 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants