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 <noreply@anthropic.com>
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This commit is contained in:
Martin Vogel
2026-09-08 20:30:17 +02:00
co-authored by Claude Fable 5.1
parent d40ed1a6bb
commit 7bf366f63b
+5
View File
@@ -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) {