From: Christopher Davis Date: Thu, 9 Sep 2010 02:55:13 +0000 (-0700) Subject: Fix a few Windows compile warnings. X-Git-Tag: release-2.0.7-rc~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ec65d6984833310ec125a91c88ef8f7654464f4;p=libevent Fix a few Windows compile warnings. --- 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);