From 3ec65d6984833310ec125a91c88ef8f7654464f4 Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Wed, 8 Sep 2010 19:55:13 -0700 Subject: [PATCH] Fix a few Windows compile warnings. --- test/regress_thread.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/regress_thread.c b/test/regress_thread.c index 757f2b2a..81adf441 100644 --- a/test/regress_thread.c +++ b/test/regress_thread.c @@ -154,6 +154,8 @@ basic_thread(void *arg) THREAD_RETURN(); } +static int notification_fd_used = 0; +#ifndef WIN32 static int got_sigchld = 0; static void sigchld_cb(evutil_socket_t fd, short event, void *arg) @@ -168,12 +170,12 @@ sigchld_cb(evutil_socket_t fd, short event, void *arg) } -static int notification_fd_used = 0; static void notify_fd_cb(evutil_socket_t fd, short event, void *arg) { ++notification_fd_used; } +#endif static void thread_basic(void *arg) @@ -185,7 +187,6 @@ thread_basic(void *arg) struct basic_test_data *data = arg; struct event_base *base = data->base; - int forking = data->setup_data && !strcmp(data->setup_data, "forking"); struct event *notification_event = NULL; struct event *sigchld_event = NULL; @@ -198,7 +199,7 @@ thread_basic(void *arg) } #ifndef WIN32 - if (forking) { + if (data->setup_data && !strcmp(data->setup_data, "forking")) { pid_t pid; int status; sigchld_event = evsignal_new(base, SIGCHLD, sigchld_cb, base);