mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 13:04:23 -04:00
Fix a few Windows compile warnings.
This commit is contained in:
parent
25b6a74be6
commit
3ec65d6984
@ -154,6 +154,8 @@ basic_thread(void *arg)
|
|||||||
THREAD_RETURN();
|
THREAD_RETURN();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int notification_fd_used = 0;
|
||||||
|
#ifndef WIN32
|
||||||
static int got_sigchld = 0;
|
static int got_sigchld = 0;
|
||||||
static void
|
static void
|
||||||
sigchld_cb(evutil_socket_t fd, short event, void *arg)
|
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
|
static void
|
||||||
notify_fd_cb(evutil_socket_t fd, short event, void *arg)
|
notify_fd_cb(evutil_socket_t fd, short event, void *arg)
|
||||||
{
|
{
|
||||||
++notification_fd_used;
|
++notification_fd_used;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
thread_basic(void *arg)
|
thread_basic(void *arg)
|
||||||
@ -185,7 +187,6 @@ thread_basic(void *arg)
|
|||||||
struct basic_test_data *data = arg;
|
struct basic_test_data *data = arg;
|
||||||
struct event_base *base = data->base;
|
struct event_base *base = data->base;
|
||||||
|
|
||||||
int forking = data->setup_data && !strcmp(data->setup_data, "forking");
|
|
||||||
struct event *notification_event = NULL;
|
struct event *notification_event = NULL;
|
||||||
struct event *sigchld_event = NULL;
|
struct event *sigchld_event = NULL;
|
||||||
|
|
||||||
@ -198,7 +199,7 @@ thread_basic(void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
if (forking) {
|
if (data->setup_data && !strcmp(data->setup_data, "forking")) {
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
int status;
|
int status;
|
||||||
sigchld_event = evsignal_new(base, SIGCHLD, sigchld_cb, base);
|
sigchld_event = evsignal_new(base, SIGCHLD, sigchld_cb, base);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user