Skip to content

Fix EEPROM save reporting success after all write attempts fail - #81

Merged
ethan-duckett-brill merged 1 commit into
mainfrom
fix-eeprom-write-shadowed-err
Nov 24, 2026
Merged

ethan-duckett-brill merged 1 commit into
mainfrom
fix-eeprom-write-shadowed-err

Conversation

@amitchone

@amitchone amitchone commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Enabled -wShadow and found the nested int err = ... within the access attempt loop. Assigning solely to the outer err means that the value that is checked will be updated within the loop and so the failure path can correctly bail instead of updating EEPROM header contents.

Claude added some tests for this.

@ethan-duckett-brill
ethan-duckett-brill merged commit 3344674 into main Nov 24, 2026
6 checks passed
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.

3 participants