Skip to content

Commit 7bf366f

Browse files
DeusDataclaude
andcommitted
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>
1 parent d40ed1a commit 7bf366f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/cli/config_edit_path.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,16 @@ static void edit_path_target_reset(cbm_config_edit_target_t *target) {
3535
target->path[0] = '\0';
3636
}
3737

38+
#ifndef _WIN32
39+
/* Only the POSIX symlink-follow resolver records a refusal reason; the Windows
40+
* build never follows, so guard this with the same condition as its callers to
41+
* avoid -Werror,-Wunused-function (#2110 CI). */
3842
static void edit_path_note(char *reason, size_t reason_size, const char *text) {
3943
if (reason && reason_size > 0U) {
4044
(void)snprintf(reason, reason_size, "%s", text);
4145
}
4246
}
47+
#endif /* !_WIN32 */
4348

4449
void cbm_config_edit_target_close(cbm_config_edit_target_t *target) {
4550
if (!target) {

0 commit comments

Comments
 (0)