Skip to content

Tidy internal linkage and two stale/dead details#178

Draft
ViralBShah wants to merge 1 commit into
mainfrom
cleanup-internal-linkage
Draft

Tidy internal linkage and two stale/dead details#178
ViralBShah wants to merge 1 commit into
mainfrom
cleanup-internal-linkage

Conversation

@ViralBShah

Copy link
Copy Markdown
Member

Three small, behavior-preserving cleanups found during a structural review:

  1. clear_other_forwards() had accidental external linkage. It's used only within src/config.c and isn't declared in the internal header, yet it was an exported library symbol. Marked static (verified: no longer present in nm -D output).

  2. Stale comment in src/libblastrampoline_internal.h: the surrogate functions live in deepbindless.c, not deepbindless_surrogates.c.

  3. Dead condition in autodetect_interface() (src/autodetection.c): the ilaver != NULL disjunct can never be true at that point (the function returns earlier when ilaver is found), so the guard is simply dpotrf != NULL.

Builds cleanly. Draft for review.

Three small, behavior-preserving cleanups found during a structural review:

- `clear_other_forwards()` is only used within `config.c`, but lacked a
  declaration and was an accidental exported symbol. Mark it `static`
  (confirmed no longer in the dynamic symbol table).

- Fix a stale comment in `libblastrampoline_internal.h`: the surrogate
  functions live in `deepbindless.c`, not `deepbindless_surrogates.c`.

- Simplify a dead condition in `autodetect_interface()`: the `ilaver != NULL`
  disjunct can never be true there (we return earlier when `ilaver` is found),
  so the check is just `dpotrf != NULL`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant