]> granicus.if.org Git - libevent/commitdiff
Fix new warnings from GCC 4.6
authorNick Mathewson <nickm@torproject.org>
Wed, 25 May 2011 20:51:25 +0000 (16:51 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 25 May 2011 20:52:03 +0000 (16:52 -0400)
evdns.c
evmap.c
test/regress_bufferevent.c

diff --git a/evdns.c b/evdns.c
index d2f21111dd388df436c9e83332d7459b773422cf..6dd3dc92e8734f5eeb086c9167b3e2dccdb151dc 100644 (file)
--- 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 5167d7abfa2dd0873d2fb87490069a211045e6ee..ebedb7881437e9c4e04d198cfb155da5eea6bd62 100644 (file)
--- 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);            \
index a120e516ca88061d58e106c4fbff4a935b974d4c..d737b48d7827ef4ad2b0ddaa9e78ab6e26965614 100644 (file)
@@ -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));