Skip to content

Clean up the 120 unused-symbol warnings in the iOS port and runtime #5783

Description

@shai-almog

Mechanical, low risk, and worth doing because it is most of what stands between
the port and runtime groups and a small enough residual to reason about:

instances flag group
71 -Wunused-variable port
28 -Wunused-function port
5 -Wunused-const-variable port
10 -Wunused-variable runtime (cn1_globals.m, nativeMethods.m)
6 -Wunused-function runtime (cn1_globals.m)

Two cautions:

  • An unused function can be a symptom, not dead weight. In ParparVM a native
    method is kept alive by its symbol appearing in the native sources, so a
    function that looks unused may be one whose caller was renamed or dropped --
    check before deleting. scripts/check-native-signatures.sh reports this class
    as ORPHAN.
  • An unused variable whose initialiser has a side effect is not safe to delete
    outright.

GCC_WARN_UNUSED_VARIABLE is one of the five warning classes the iOS template
currently disables at project level; the census re-enables it as a command-line
override. Flipping it in the template is gated on this category reaching zero.

Found by the native warning census (scripts/check-native-warnings.py).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions