Skip to content

Commit a3c24a7

Browse files
DeusDataclaude
andcommitted
test(cli): guard POSIX-only fd-capture helpers under _WIN32 (DeusData#2110)
cli_fd_capture_begin/end use POSIX fd redirection (dup/dup2/tmpfile) and are called only by the uninstall tests, which are themselves #ifndef _WIN32. Defined at top level, the helpers were compiled but unused on Windows, tripping -Werror,-Wunused-function on the test-windows CLANG64 leg. Wrap the struct and both helpers in #ifndef _WIN32 to match their callers. Test-only; no production change. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 7bf366f commit a3c24a7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎tests/test_cli.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ static void test_rmdir_r(const char *path) {
722722
th_rmtree(path);
723723
}
724724

725+
#ifndef _WIN32
725726
/* Capture everything a command writes to one fd (stdout or stderr) so a test
726727
* can assert on the transcript. Restores the fd on end and returns the text. */
727728
typedef struct {
@@ -774,6 +775,7 @@ static char *cli_fd_capture_end(cli_fd_capture_t *capture) {
774775
}
775776
return text;
776777
}
778+
#endif /* !_WIN32 -- POSIX-only fd-capture helpers (#2110) */
777779

778780
/* Mandatory-daemon activation guard fixture. The production path uses the
779781
* stable per-account endpoint directly; these callbacks make every race

0 commit comments

Comments
 (0)