commit ae9e12808009767d79769218f0969b7fbe8ccb4d from: isaac date: Sat Jun 27 00:48:39 2026 UTC fix build warnings: drop dead resolve_secret, declare forkpty in tui test parent.c: resolve_secret was kept as a back-compat wrapper during the api-hardening sweep but every caller moved to secret_load -- remove it (-Wunused-function). tui_test.c: it included for forkpty(3), but the build is -I.../src/common where fugu has its own util.h, which shadowed the system header; declare forkpty directly instead. commit - a74240b311a442acedb186d30f70edfe847de213 commit + ae9e12808009767d79769218f0969b7fbe8ccb4d blob - 1bd9ff45a0e7a53d690ca834cf295ddec77e9a05 blob + 562649126dc2a099692e5987f8c1c5b1facd22f8 --- regress/tui/tui_test.c +++ regress/tui/tui_test.c @@ -40,10 +40,17 @@ #include #include #include -#include #include +/* + * forkpty(3) is declared in the system , but the build's + * -I.../src/common puts fugu's own util.h (no forkpty) first on the include + * path, shadowing it. This test uses nothing else from either util.h, so + * declare forkpty directly, matching the system prototype. + */ +pid_t forkpty(int *, char *, const struct termios *, const struct winsize *); + #include "buf.h" static int checks, failures; blob - b3a268bbd778f327dfe05f3dd4dd3520f7ce3e2a blob + 840c70f401fcaf6e66fd86a9c9a83f410a9e9bbc --- src/parent/parent.c +++ src/parent/parent.c @@ -116,7 +116,6 @@ static void delegate_exec(struct conf_settings *); static void delegate_fetch(struct conf_settings *); static int secret_load(int, const char *, int, const char *, char **, size_t *); -static char *resolve_secret(int, const char *, int, const char *); static struct worker *worker_by_ep(uint32_t); static int relay_loop(void); static int relay_drain(struct worker *); @@ -878,26 +877,6 @@ secret_load(int have_inline, const char *inline_val, i return (0); } -/* - * Back-compat wrapper that throws away the length. Use only when the caller - * is about to feed the bytes into a strlen-safe sink (e.g. a log message). - * Secret-bearing paths must call secret_load() directly so freezero() and - * the imsg payload see the true byte count. - */ -static char * -resolve_secret(int have_inline, const char *inline_val, int have_file, - const char *file_path) -{ - char *out; - size_t len; - - (void)len; - if (secret_load(have_inline, inline_val, have_file, file_path, - &out, &len) == -1) - return (NULL); - return (out); -} - static struct worker * worker_by_ep(uint32_t ep) {