Repository navigation
refactor: remove dead code and scope deprecation suppression - #11
Merged
Merged
Conversation
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
Dead-code audit result: no unused functions, macros,
externdeclarations, or files. Two small leftovers are removed, and the deprecation suppression is narrowed so it stops hiding new deprecations.This matches upstream yabai, which also scopes this suppression to individual functions.
Evidence
-Wdeprecated-declarationspragma covers the whole ofmainfor twoGetProcessPIDcalls, so-Werrorcannot catch a new deprecation there.After: with the build flags CI uses,
CFLAGS="-O2 -Werror" make all test build/follow-testpasses: 10 CLI checks and 3 binary checks, and the live test compiles.clang -Wunused -Wunused-macros -Wunreachable-code-aggressivereports nothing onsrc/ferry.mortests/follow.m.make test-followwas not run: it switches Spaces on a live desktop.Merge Danger
Door: two-way
Blast Radius: small
The PID lookup is now behind
process_pid(), which returns 0 on failure. Both callers handled 0 before, so behavior should not change, but no automated test covers this path on CI.