From 7bf366f63b3fd5211cec19e483ee2ed27145ca14 Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Tue, 8 Sep 2026 20:30:17 +0200 Subject: [PATCH] fix(cli): guard the POSIX-only edit-path note recorder from the Windows build config_edit_path.c's edit_path_note is defined before the '#ifndef _WIN32' follow-resolver block but only called inside it, so the Windows build compiled it dead and failed under -Werror,-Wunused-function (pr-smoke windows-latest). Windows never follows a symlinked config, so guard the recorder with the same condition as its callers. Co-Authored-By: Claude Fable 5.1 Signed-off-by: Martin Vogel --- src/cli/config_edit_path.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cli/config_edit_path.c b/src/cli/config_edit_path.c index b51c5c2a2..ec26a5534 100644 --- a/src/cli/config_edit_path.c +++ b/src/cli/config_edit_path.c @@ -35,11 +35,16 @@ static void edit_path_target_reset(cbm_config_edit_target_t *target) { target->path[0] = '\0'; } +#ifndef _WIN32 +/* Only the POSIX symlink-follow resolver records a refusal reason; the Windows + * build never follows, so guard this with the same condition as its callers to + * avoid -Werror,-Wunused-function (#2110 CI). */ static void edit_path_note(char *reason, size_t reason_size, const char *text) { if (reason && reason_size > 0U) { (void)snprintf(reason, reason_size, "%s", text); } } +#endif /* !_WIN32 */ void cbm_config_edit_target_close(cbm_config_edit_target_t *target) { if (!target) {