From 06a714ffe4a58866a33ff3e139e2cb298835b9c5 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 25 May 2011 16:51:25 -0400 Subject: [PATCH] Fix new warnings from GCC 4.6 --- evdns.c | 3 +++ evmap.c | 1 - test/regress_bufferevent.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/evdns.c b/evdns.c index d2f21111..6dd3dc92 100644 --- a/evdns.c +++ b/evdns.c @@ -1150,6 +1150,9 @@ request_parse(u8 *packet, int length, struct evdns_server_port *port, struct soc GET16(answers); GET16(authority); GET16(additional); + (void)answers; + (void)additional; + (void)authority; if (flags & 0x8000) return -1; /* Must not be an answer. */ flags &= 0x0110; /* Only RD and CD get preserved. */ diff --git a/evmap.c b/evmap.c index 5167d7ab..ebedb788 100644 --- a/evmap.c +++ b/evmap.c @@ -164,7 +164,6 @@ void evmap_io_clear(struct event_io_map *ctx) #define GET_SIGNAL_SLOT_AND_CTOR(x, map, slot, type, ctor, fdinfo_len) \ do { \ if ((map)->entries[slot] == NULL) { \ - EVUTIL_ASSERT(ctor != NULL); \ (map)->entries[slot] = \ mm_calloc(1,sizeof(struct type)+fdinfo_len); \ EVUTIL_ASSERT((map)->entries[slot] != NULL); \ diff --git a/test/regress_bufferevent.c b/test/regress_bufferevent.c index a120e516..d737b48d 100644 --- a/test/regress_bufferevent.c +++ b/test/regress_bufferevent.c @@ -551,7 +551,7 @@ want_fail_eventcb(struct bufferevent *bev, short what, void *ctx) if (what & BEV_EVENT_ERROR) { s = bufferevent_getfd(bev); err = evutil_socket_error_to_string(evutil_socket_geterror(s)); - TT_BLATHER(("connection failure %s", err)); + TT_BLATHER(("connection failure on %d: %s", s, err)); test_ok = 1; } else { TT_FAIL(("didn't fail? what %hd", what)); -- 2.40.0