Skip to content

Commit 0814af1

Browse files
committed
fix(test): guard POSIX-only supervised-route helpers behind ifndef _WIN32
The idx832/idx853 fork-harness helpers are used only in the POSIX (#else) branch of their tests; on Windows (SKIP_PLATFORM) they are unused → -Werror,-Wunused-function on the CLANG64 leg. Guard the definitions to match their call sites. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 4015783 commit 0814af1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎tests/test_mcp.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4196,6 +4196,7 @@ enum {
41964196
IDX832_SERVER_FAIL = 54,
41974197
};
41984198

4199+
#ifndef _WIN32 /* helper used only by the POSIX fork harness below */
41994200
static int idx832_supervised_route_check(const char *repo_dir) {
42004201
/* Become a supervisor host with the kill switch OFF — exactly the real MCP
42014202
* server's state. Done in the FORKED CHILD only (see the harness) so the
@@ -4248,6 +4249,7 @@ static int idx832_supervised_route_check(const char *repo_dir) {
42484249
free(project);
42494250
return code;
42504251
}
4252+
#endif /* !_WIN32 */
42514253

42524254
TEST(index_bg_paths_route_through_supervisor_issue832) {
42534255
#ifdef _WIN32
@@ -4472,6 +4474,7 @@ enum {
44724474
IDX853_BAD_COUNT = 64, /* unexpected watch_count (<0 or >1) */
44734475
};
44744476

4477+
#ifndef _WIN32 /* helper used only by the POSIX fork harness below */
44754478
static int idx853_supervised_autowatch_check(const char *repo_dir, const char *cache_dir) {
44764479
/* Become a supervisor host with the kill switch OFF — the real prod MCP
44774480
* server's state. Done in the FORKED CHILD only (see harness) so the parent
@@ -4545,6 +4548,7 @@ static int idx853_supervised_autowatch_check(const char *repo_dir, const char *c
45454548
cbm_config_close(cfg);
45464549
return code;
45474550
}
4551+
#endif /* !_WIN32 */
45484552

45494553
TEST(mcp_auto_watch_false_skips_supervised_autoindex_issue853) {
45504554
#ifdef _WIN32

0 commit comments

Comments
 (0)