Clean up some -pedantic warnings about passing non-void-pointers with %p.
[srvx.git] / src / sar.c
index b5637501d44fb9341d20a7f07b4bf8cd0392c19f..43cc638fafe5a15e7a7e042518a1d0791c5a7530 100644 (file)
--- a/src/sar.c
+++ b/src/sar.c
@@ -259,14 +259,14 @@ sar_request_fail(struct sar_request *req, unsigned int rcode)
     sar_request_abort(req);
 }
 
-static time_t next_sar_timeout;
+static unsigned long next_sar_timeout;
 
 static void
 sar_timeout_cb(void *data)
 {
     dict_iterator_t it;
     dict_iterator_t next;
-    time_t next_timeout = INT_MAX;
+    unsigned long next_timeout = INT_MAX;
 
     for (it = dict_first(sar_requests); it; it = next) {
         struct sar_request *req;
@@ -289,7 +289,7 @@ sar_timeout_cb(void *data)
 }
 
 static void
-sar_check_timeout(time_t when)
+sar_check_timeout(unsigned long when)
 {
     if (!next_sar_timeout || when < next_sar_timeout) {
         timeq_del(0, sar_timeout_cb, NULL, TIMEQ_IGNORE_WHEN | TIMEQ_IGNORE_DATA);
@@ -632,7 +632,7 @@ sar_fd_readable(struct io_fd *fd)
 
     sprintf(id_text, "%d", hdr.id);
     req = dict_find(sar_requests, id_text, NULL);
-    log_module(sar_log, LOG_DEBUG, "sar_fd_readable(%p): hdr {id=%d, flags=0x%x, qdcount=%d, ancount=%d, nscount=%d, arcount=%d} -> req %p", fd, hdr.id, hdr.flags, hdr.qdcount, hdr.ancount, hdr.nscount, hdr.arcount, req);
+    log_module(sar_log, LOG_DEBUG, "sar_fd_readable(%p): hdr {id=%d, flags=0x%x, qdcount=%d, ancount=%d, nscount=%d, arcount=%d} -> req %p", (void*)fd, hdr.id, hdr.flags, hdr.qdcount, hdr.ancount, hdr.nscount, hdr.arcount, (void*)req);
     if (!req || !req->retries || !(hdr.flags & REQ_FLAG_QR)) {
         ns->resp_ignored++;
         return;
@@ -1137,7 +1137,7 @@ sar_getaddr_append(struct sar_getaddr_state *state, struct addrinfo *ai, int cop
 {
     unsigned int count;
 
-    log_module(sar_log, LOG_DEBUG, "sar_getaddr_append({full_name=%s}, ai=%p, copy=%d)", state->full_name, ai, copy);
+    log_module(sar_log, LOG_DEBUG, "sar_getaddr_append({full_name=%s}, ai=%p, copy=%d)", state->full_name, (void*)ai, copy);
 
     /* Set the appropriate pointer to the new element(s). */
     if (state->ai_tail)