Fix all implicit case fallthrough (#287)#1
Merged
rampageservices merged 1 commit intodevelopfrom Mar 1, 2026
Merged
Conversation
) Enable -Wimplicit-fallthrough and add [[fallthrough]] annotations to intentional case fallthroughs in amacro.c, callbacks.c, csv.c, and main.c. Fix two bugs exposed by the review: - drill.c case 'R' was falling through to case 'S', causing eat_line() to consume the next drill command after repeat-hole - callbacks.c SAVE_FILE_RS274XM was falling through to SAVE_FILE_DRILL, presenting a drill dialog for RS-274X export
d87216b to
e7e10d6
Compare
Author
|
Fixed both — |
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.
Summary
-Wimplicit-fallthroughinCMakeLists.txtcompiler flags[[fallthrough]];attributeChanges
src/amacro.ccase '0':→case '1':src/callbacks.cSAVE_FILE_RS274XM→SAVE_FILE_DRILLsrc/callbacks.cLAYER_SELECTED→defaultsrc/csv.c(×2)ST_START→ST_COLLECTsrc/drill.ccase 'R':→case 'S':src/main.ccase 'w':→case 'W':Test plan
-Wimplicit-fallthroughwarningstest-amacro-hex-expression.gbxexports correctlytest-gerber-x2-attributes.gbxexports correctlyUpstream PR: gerbv#294
Closes gerbv#287 (upstream)