From: Nick Mathewson Date: Sat, 23 Jan 2010 21:23:45 +0000 (-0500) Subject: Make it compile under gcc --std=c89. X-Git-Tag: release-2.0.4-alpha~67 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2ca403faed26e0e709728ddc2efce1da8bd99d7;p=libevent Make it compile under gcc --std=c89. --- diff --git a/buffer_iocp.c b/buffer_iocp.c index 31a1d1b4..c9bc42fe 100644 --- a/buffer_iocp.c +++ b/buffer_iocp.c @@ -100,7 +100,7 @@ evbuffer_commit_read(struct evbuffer *evbuf, ev_ssize_t nBytes) EVBUFFER_LOCK(evbuf); EVUTIL_ASSERT(buf->read_in_progress && !buf->write_in_progress); - EVUTIL_ASSERT(nBytes >= 0); // XXXX Can this be false? + EVUTIL_ASSERT(nBytes >= 0); /* XXXX Can this be false? */ evbuffer_unfreeze(evbuf, 0); diff --git a/evdns.c b/evdns.c index fdf7026e..924e5e45 100644 --- a/evdns.c +++ b/evdns.c @@ -2850,7 +2850,7 @@ int evdns_resolve_reverse_ipv6(const struct in6_addr *in, int flags, evdns_callb ? 0 : -1; } -/*/////////////////////////////////////////////////////////////////// */ +/* ================================================================= */ /* Search support */ /* */ /* the libc resolver has support for searching a number of domains */ @@ -3121,7 +3121,7 @@ search_request_finished(struct evdns_request *const req) { } } -/*/////////////////////////////////////////////////////////////////// */ +/* ================================================================= */ /* Parsing resolv.conf files */ static void diff --git a/test/regress_listener.c b/test/regress_listener.c index 87269f4a..c89f18c5 100644 --- a/test/regress_listener.c +++ b/test/regress_listener.c @@ -67,7 +67,6 @@ regress_pick_a_port(void *arg) struct basic_test_data *data = arg; struct event_base *base = data->base; struct evconnlistener *listener1 = NULL, *listener2 = NULL; - //struct event *connecting; struct sockaddr_in sin; int count1 = 2, count2 = 1; struct sockaddr_storage ss1, ss2; diff --git a/test/test-ratelim.c b/test/test-ratelim.c index 92f73e92..a26d00e1 100644 --- a/test/test-ratelim.c +++ b/test/test-ratelim.c @@ -77,7 +77,6 @@ loud_writecb(struct bufferevent *bev, void *ctx) while (evbuffer_get_length(output) < 8192) { evbuffer_add(output, buf, sizeof(buf)); cs->queued += sizeof(buf); - // printf("queued %d\n", (int)sizeof(buf)); } } @@ -89,7 +88,6 @@ discard_readcb(struct bufferevent *bev, void *ctx) size_t len = evbuffer_get_length(input); evbuffer_drain(input, len); cs->received += len; - // printf("read %d bytes\n", (int)len); } static void @@ -108,9 +106,7 @@ echo_readcb(struct bufferevent *bev, void *ctx) struct evbuffer *input = bufferevent_get_input(bev); struct evbuffer *output = bufferevent_get_output(bev); - // puts("read."); evbuffer_add_buffer(output, input); - // printf(" outbuf len is now %d\n", (int)evbuffer_get_length(output)); if (evbuffer_get_length(output) > 1024000) bufferevent_disable(bev, EV_READ); } @@ -191,7 +187,6 @@ test_ratelimiting(void) states = calloc(cfg_n_connections, sizeof(struct client_state)); for (i = 0; i < cfg_n_connections; ++i) { - // printf("creating %d:\n",i); bevs[i] = bufferevent_socket_new(base, -1, BEV_OPT_CLOSE_ON_FREE|BEV_OPT_THREADSAFE); assert(bevs[i]);