From 25bc5a121b76ab3af2065be7535766345692c146 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Sun, 1 Feb 2009 07:08:38 +1100 Subject: [PATCH] Fix warning with printing 'written' in 64bit arch 'written' is 'gsize' which is 64bit on x86_64. So it cannot be printed with "%d". So cast to (int) before printing. This fixes a warning Signed-off-by: Neil Brown --- src/gsm0710muxd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gsm0710muxd.c b/src/gsm0710muxd.c index 0e5b88e..eaef3e6 100644 --- a/src/gsm0710muxd.c +++ b/src/gsm0710muxd.c @@ -1437,9 +1437,9 @@ int extract_frames( //data from logical channel g_io_channel_write_chars(channellist[frame->channel].g_channel, (gchar*)frame->data, (gssize)frame->length, &written, NULL); if (written != frame->length) - LOG(LOG_WARNING, "Pty write buffer overflow, data loss: needed to write %d bytes, written %d, channel %d", frame->length, written, frame->channel); + LOG(LOG_WARNING, "Pty write buffer overflow, data loss: needed to write %d bytes, written %d, channel %d", frame->length, (int)written, frame->channel); else - LOG(LOG_DEBUG, "Written %d bytes to pty channel %d", written, frame->channel); + LOG(LOG_DEBUG, "Written %d bytes to pty channel %d", (int)written, frame->channel); g_io_channel_flush(channellist[frame->channel].g_channel, NULL ); } else -- 2.39.5