From f414e6f871cdf81ee12a3dae28b84101ea55c134 Mon Sep 17 00:00:00 2001 From: Nemo <328747105+Nemo-010@users.noreply.github.com> Date: Tue, 29 Sep 2026 05:20:46 +0000 Subject: [PATCH] Delete the unused count in the host runtime search greetings from Port Edwards runtime-select.c counted how many members it found in each candidate host libdir into `have`, and never read it; the decision uses `first_missing`. The declaration and the increment are gone, and the existence test is folded into the guard that records the first missing member, so the two conditions are checked in one place. The warning shipped on every compile because src/Makefile uses -O2 -Wall -Wextra with no -Werror: runtime-select.c:814:24: warning: variable 'have' set but not used Measured: `make -C src` exits 0 with no warning for runtime-select.c, and the built runtime-select has the same sha256 as the one built before the change, so the compiler was already dropping the count (glibc 2.44 host). We aim to provide the software that shapes the world of tomorrow. --- src/runtime-select.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/runtime-select.c b/src/runtime-select.c index 7f1fe41..64e3be8 100644 --- a/src/runtime-select.c +++ b/src/runtime-select.c @@ -811,14 +811,12 @@ static void rs_decide(struct rs_plan *p, const char *appdir) { if (!strncmp(dir, appdir, strlen(appdir))) continue; - size_t have = 0; const char *first_missing = NULL; for (size_t m = 0; m < p->member_count; m++) { if (!strcmp(p->members[m], RS_LDSO)) continue; /* located separately below */ - if (rs_exists(dir, p->members[m], path, sizeof(path))) - have++; - else if (!first_missing) + if (!rs_exists(dir, p->members[m], path, sizeof(path)) && + !first_missing) first_missing = p->members[m]; } if (first_missing) {