From 6ec6a6c966c6a8264c16e3c6f11205566e167bea Mon Sep 17 00:00:00 2001 From: Jeremy Lakeman Date: Wed, 27 Nov 2013 12:59:52 +1030 Subject: [PATCH] Fix printf formats --- overlay_buffer.c | 6 +++--- overlay_mdp.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/overlay_buffer.c b/overlay_buffer.c index 06686e3d..8eb3bdd1 100644 --- a/overlay_buffer.c +++ b/overlay_buffer.c @@ -167,7 +167,7 @@ ssize_t _ob_makespace(struct __sourceloc __whence, struct overlay_buffer *b, siz { assert(b != NULL); if (config.debug.overlaybuffer) - DEBUGF("ob_makespace(b=%p, bytes=%d) b->bytes=%p b->position=%d b->allocSize=%d", + DEBUGF("ob_makespace(b=%p, bytes=%zd) b->bytes=%p b->position=%d b->allocSize=%d", b, bytes, b->bytes, b->position, b->allocSize); assert(b->position >= 0); if (b->sizeLimit != -1) @@ -177,7 +177,7 @@ ssize_t _ob_makespace(struct __sourceloc __whence, struct overlay_buffer *b, siz assert(b->bytes != NULL); if (b->sizeLimit != -1 && b->position + bytes > b->sizeLimit) { if (config.debug.packetformats) - DEBUGF("ob_makespace(): asked for space to %u, beyond size limit of %u", b->position + bytes, b->sizeLimit); + DEBUGF("ob_makespace(): asked for space to %zu, beyond size limit of %u", b->position + bytes, b->sizeLimit); return 0; } if (b->position + bytes <= b->allocSize) @@ -185,7 +185,7 @@ ssize_t _ob_makespace(struct __sourceloc __whence, struct overlay_buffer *b, siz // Don't realloc a static buffer. if (b->bytes && b->allocated == NULL) { if (config.debug.packetformats) - DEBUGF("ob_makespace(): asked for space to %u, beyond static buffer size of %u", b->position + bytes, b->allocSize); + DEBUGF("ob_makespace(): asked for space to %zu, beyond static buffer size of %u", b->position + bytes, b->allocSize); return 0; } int newSize=b->position+bytes; diff --git a/overlay_mdp.c b/overlay_mdp.c index d749ba51..a1391220 100644 --- a/overlay_mdp.c +++ b/overlay_mdp.c @@ -819,7 +819,7 @@ int overlay_mdp_dispatch(overlay_mdp_frame *mdp,int userGeneratedFrameP, RETURN(-1); } if (config.debug.mdprequests) { - DEBUGF("[%u] Send frame %zu bytes", __d, ob_position(plaintext)); + DEBUGF("[%u] Send frame %u bytes", __d, ob_position(plaintext)); dump("Frame plaintext", ob_ptr(plaintext), ob_position(plaintext)); }