Repository navigation
Fix -Wshadow warnings in library sources (#169) - #5
Closed
zakoverflow wants to merge 1 commit into
Closed
zakoverflow wants to merge 1 commit into
zakoverflow wants to merge 1 commit into
Conversation
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.
Coverage Report for CI Build 38460624123Coverage remained the same at 93.408%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.