summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2015-03-03 08:51:53 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2015-04-21 10:17:31 +0200
commiteed3c48d3a7d2dae2cae2f2f250deffb843754a6 (patch)
tree07b2252438225065024d4a534eddf0e86c9b87a4 /lib
parentef008d2f8dc8f7160d8a3d24a15f2fad79ef3242 (diff)
downloadquagga-eed3c48d3a7d2dae2cae2f2f250deffb843754a6.tar.bz2
quagga-eed3c48d3a7d2dae2cae2f2f250deffb843754a6.tar.xz
*: use void * for printing pointers
On higher warning levels, compilers expect %p printf arguments to be void *. Since format string / argument warnings can be useful otherwise, let's get rid of this noise by sprinkling casts to void * over printf calls. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/buffer.c3
-rw-r--r--lib/stream.c2
-rw-r--r--lib/zclient.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/buffer.c b/lib/buffer.c
index 45e2e1c5..b689549e 100644
--- a/lib/buffer.c
+++ b/lib/buffer.c
@@ -322,7 +322,8 @@ buffer_flush_window (struct buffer *b, int fd, int width, int height,
/* This should absolutely never occur. */
zlog_err("%s: corruption detected: iov_small overflowed; "
"head %p, tail %p, head->next %p",
- __func__, b->head, b->tail, b->head->next);
+ __func__, (void *)b->head, (void *)b->tail,
+ (void *)b->head->next);
iov = XMALLOC(MTYPE_TMP, iov_alloc*sizeof(*iov));
memcpy(iov, small_iov, sizeof(small_iov));
}
diff --git a/lib/stream.c b/lib/stream.c
index c6f20c85..e13da08b 100644
--- a/lib/stream.c
+++ b/lib/stream.c
@@ -53,7 +53,7 @@
*/
#define STREAM_WARN_OFFSETS(S) \
zlog_warn ("&(struct stream): %p, size: %lu, getp: %lu, endp: %lu\n", \
- (S), \
+ (void *)(S), \
(unsigned long) (S)->size, \
(unsigned long) (S)->getp, \
(unsigned long) (S)->endp)\
diff --git a/lib/zclient.c b/lib/zclient.c
index 41ecbb61..963c7052 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -919,7 +919,7 @@ zclient_read (struct thread *thread)
length -= ZEBRA_HEADER_SIZE;
if (zclient_debug)
- zlog_debug("zclient 0x%p command 0x%x \n", zclient, command);
+ zlog_debug("zclient 0x%p command 0x%x \n", (void *)zclient, command);
switch (command)
{