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).
Mechanical, low risk, and worth doing because it is most of what stands between
the
portandruntimegroups and a small enough residual to reason about:-Wunused-variable-Wunused-function-Wunused-const-variable-Wunused-variablecn1_globals.m,nativeMethods.m)-Wunused-functioncn1_globals.m)Two cautions:
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.shreports this classas
ORPHAN.outright.
GCC_WARN_UNUSED_VARIABLEis one of the five warning classes the iOS templatecurrently 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).