diff --git a/event-internal.h b/event-internal.h index 669ae2b0..50e1e4d2 100644 --- a/event-internal.h +++ b/event-internal.h @@ -267,7 +267,7 @@ struct event_base { int is_notify_pending; /** A socketpair used by some th_notify functions to wake up the main * thread. */ - int th_notify_fd[2]; + evutil_socket_t th_notify_fd[2]; /** An event used by some th_notify functions to wake up the main * thread. */ struct event th_notify; diff --git a/test/regress_util.c b/test/regress_util.c index 4eea2e9c..fc263bcf 100644 --- a/test/regress_util.c +++ b/test/regress_util.c @@ -602,7 +602,7 @@ end: } struct example_struct { - long a; + const char *a; const char *b; long c; }; @@ -612,11 +612,11 @@ test_evutil_upcast(void *arg) { struct example_struct es1; const char **cp; - es1.a = 5; + es1.a = "World"; es1.b = "Hello"; es1.c = -99; - tt_int_op(evutil_offsetof(struct example_struct, b), ==, sizeof(long)); + tt_int_op(evutil_offsetof(struct example_struct, b), ==, sizeof(char*)); cp = &es1.b; tt_ptr_op(EVUTIL_UPCAST(cp, struct example_struct, b), ==, &es1); diff --git a/test/test-eof.c b/test/test-eof.c index fd226193..3d4be93d 100644 --- a/test/test-eof.c +++ b/test/test-eof.c @@ -62,7 +62,7 @@ main(int argc, char **argv) { struct event ev; const char *test = "test string"; - int pair[2]; + evutil_socket_t pair[2]; #ifdef WIN32 WORD wVersionRequested; diff --git a/test/test-weof.c b/test/test-weof.c index 8d1b0ab8..2423d217 100644 --- a/test/test-weof.c +++ b/test/test-weof.c @@ -33,7 +33,7 @@ #define __func__ _EVENT___func__ #endif -int pair[2]; +evutil_socket_t pair[2]; int test_okay = 1; int called = 0;