Repository navigation
Fix -Wshadow warnings in library sources (#169) - #6
Closed
zakoverflow wants to merge 1 commit into
Closed
zakoverflow wants to merge 1 commit into
zakoverflow wants to merge 1 commit into
Conversation
Reuse the outer err variable instead of redeclaring it in inner scopes (each path returns immediately), rename the inner card.binary.put request to putReq, and add -Wshadow to the unit-test library build so new shadowing fails under -Werror. No behavior change.
Coverage Report for CI Build 38460736362Coverage 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.
Shadowing part of blues#169 only.
const char *errredeclarations become assignments to the outererr(each returns right away); innerJ *reqfor card.binary.put renamedputReq.errredeclaration becomes an assignment.-Wshadowto the note_c unit-test target (already -Werror) as a regression guard.gcc -fsyntax-only -Wshadow -I. n_*.c: 8 warnings (16 diagnostic lines incl. notes) -> 0. Unit tests: 166/166 pass.Blast radius: local variable names only, in NoteBinaryStoreReceive/Transmit and _i2cNoteQueryLength; no API, ABI, or control-flow change. Build flag affects the test target only.