From 736a484129bef7eb1c348e1977bb9ed59b80c6c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 22 Nov 2011 01:40:39 +0000 Subject: [PATCH] More printf format warning fixes --- ext/annodex/gstcmmldec.c | 2 +- ext/flac/gstflacdec.c | 18 ++++++++++-------- ext/flac/gstflacenc.c | 3 ++- ext/flac/gstflactag.c | 8 +++++--- ext/jpeg/gstjpegdec.c | 5 +++-- ext/speex/gstspeexdec.c | 4 ++-- ext/speex/gstspeexenc.c | 4 ++-- sys/v4l2/gstv4l2bufferpool.c | 2 +- sys/ximage/gstximagesrc.c | 4 ++-- 9 files changed, 28 insertions(+), 22 deletions(-) diff --git a/ext/annodex/gstcmmldec.c b/ext/annodex/gstcmmldec.c index 2e435cb338..050224ae5f 100644 --- a/ext/annodex/gstcmmldec.c +++ b/ext/annodex/gstcmmldec.c @@ -457,7 +457,7 @@ gst_cmml_dec_parse_ident_header (GstCmmlDec * dec, guint8 * data, gsize size) /* the ident header has a fixed length */ if (size != CMML_IDENT_HEADER_SIZE) { GST_ELEMENT_ERROR (dec, STREAM, DECODE, - (NULL), ("wrong ident header size: %d", size)); + (NULL), ("wrong ident header size: %" G_GSIZE_FORMAT, size)); dec->flow_return = GST_FLOW_ERROR; return; diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c index 9121181093..9dc0ca2396 100644 --- a/ext/flac/gstflacdec.c +++ b/ext/flac/gstflacdec.c @@ -266,8 +266,8 @@ gst_flac_dec_set_format (GstAudioDecoder * dec, GstCaps * caps) return FALSE; header_buf = g_value_dup_boxed (header_val); - GST_INFO_OBJECT (dec, "pushing header buffer of %d bytes into adapter", - gst_buffer_get_size (header_buf)); + GST_INFO_OBJECT (dec, "pushing header buffer of %" G_GSIZE_FORMAT " bytes " + "into adapter", gst_buffer_get_size (header_buf)); gst_adapter_push (flacdec->adapter, header_buf); } @@ -499,7 +499,8 @@ gst_flac_dec_read_stream (const FLAC__StreamDecoder * decoder, return FLAC__STREAM_DECODER_READ_STATUS_ABORT; } - GST_LOG_OBJECT (dec, "feeding %u bytes to decoder (available=%u, bytes=%u)", + GST_LOG_OBJECT (dec, "feeding %u bytes to decoder " + "(available=%" G_GSIZE_FORMAT ", bytes=%u)", len, gst_adapter_available (dec->adapter), (guint) * bytes); gst_adapter_copy (dec->adapter, buffer, 0, len); *bytes = len; @@ -693,9 +694,9 @@ gst_flac_dec_handle_frame (GstAudioDecoder * audio_dec, GstBuffer * buf) return GST_FLOW_OK; } - GST_LOG_OBJECT (dec, "frame: ts %" GST_TIME_FORMAT ", flags 0x%04x, %u bytes", - GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), GST_BUFFER_FLAGS (buf), - gst_buffer_get_size (buf)); + GST_LOG_OBJECT (dec, "frame: ts %" GST_TIME_FORMAT ", flags 0x%04x, " + "%" G_GSIZE_FORMAT " bytes", GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), + GST_BUFFER_FLAGS (buf), gst_buffer_get_size (buf)); /* drop any in-stream headers, we've processed those in set_format already */ if (G_UNLIKELY (!dec->got_headers)) { @@ -710,7 +711,8 @@ gst_flac_dec_handle_frame (GstAudioDecoder * audio_dec, GstBuffer * buf) gst_buffer_unmap (buf, data, size); if (!got_audio_frame) { - GST_INFO_OBJECT (dec, "dropping in-stream header, %d bytes", size); + GST_INFO_OBJECT (dec, "dropping in-stream header, %" G_GSIZE_FORMAT " " + "bytes", size); gst_audio_decoder_finish_frame (audio_dec, NULL, 1); return GST_FLOW_OK; } @@ -725,7 +727,7 @@ gst_flac_dec_handle_frame (GstAudioDecoder * audio_dec, GstBuffer * buf) dec->last_flow = GST_FLOW_OK; /* framed - there should always be enough data to decode something */ - GST_LOG_OBJECT (dec, "%u bytes available", + GST_LOG_OBJECT (dec, "%" G_GSIZE_FORMAT " bytes available", gst_adapter_available (dec->adapter)); if (!FLAC__stream_decoder_process_single (dec->decoder)) { diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c index 989ce4c52e..1b3dac2252 100644 --- a/ext/flac/gstflacenc.c +++ b/ext/flac/gstflacenc.c @@ -1036,7 +1036,8 @@ push_headers: GstBuffer *buf; buf = GST_BUFFER (l->data); - GST_LOG_OBJECT (enc, "Pushing header buffer, size %u bytes", + GST_LOG_OBJECT (enc, + "Pushing header buffer, size %" G_GSIZE_FORMAT " bytes", gst_buffer_get_size (buf)); #if 0 GST_MEMDUMP_OBJECT (enc, "header buffer", GST_BUFFER_DATA (buf), diff --git a/ext/flac/gstflactag.c b/ext/flac/gstflactag.c index ebca96b4d2..4a1428e067 100644 --- a/ext/flac/gstflactag.c +++ b/ext/flac/gstflactag.c @@ -258,7 +258,8 @@ gst_flac_tag_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) tag->metadata_last_block = is_last; GST_DEBUG_OBJECT (tag, - "got metadata block: %d bytes, type %d, is vorbiscomment: %d, is last: %d", + "got metadata block: %" G_GSIZE_FORMAT " bytes, type %d, " + "is vorbiscomment: %d, is last: %d", size, type, (type == 0x04), is_last); /* Metadata blocks of type 4 are vorbis comment blocks */ @@ -404,7 +405,8 @@ gst_flac_tag_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) data[3] = ((size - 4) & 0x0000FF); gst_buffer_unmap (buffer, data, size); - GST_DEBUG_OBJECT (tag, "pushing %d byte vorbiscomment buffer", size); + GST_DEBUG_OBJECT (tag, "pushing %" G_GSIZE_FORMAT " byte vorbiscomment " + "buffer", size); ret = gst_pad_push (tag->srcpad, buffer); if (ret != GST_FLOW_OK) { @@ -451,7 +453,7 @@ comment_too_long: * be a real world problem though */ GST_ELEMENT_ERROR (tag, CORE, TAG, (NULL), - ("Vorbis comment of size %d too long", size)); + ("Vorbis comment of size %" G_GSIZE_FORMAT " too long", size)); ret = GST_FLOW_ERROR; goto cleanup; } diff --git a/ext/jpeg/gstjpegdec.c b/ext/jpeg/gstjpegdec.c index e1ec259141..3c47a4c7a5 100644 --- a/ext/jpeg/gstjpegdec.c +++ b/ext/jpeg/gstjpegdec.c @@ -1350,8 +1350,9 @@ gst_jpeg_dec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) (dec->segment.stop != -1) && (gst_adapter_available (dec->adapter) < dec->segment.stop)) { /* We assume that non-packetized input in bytes is *one* single jpeg image */ - GST_DEBUG ("Non-packetized mode. Got %d bytes, need %" G_GINT64_FORMAT, - gst_adapter_available (dec->adapter), dec->segment.stop); + GST_DEBUG ("Non-packetized mode. Got %" G_GSIZE_FORMAT " bytes, " + "need %" G_GINT64_FORMAT, gst_adapter_available (dec->adapter), + dec->segment.stop); goto need_more_data; } diff --git a/ext/speex/gstspeexdec.c b/ext/speex/gstspeexdec.c index bb818b0978..19368202b2 100644 --- a/ext/speex/gstspeexdec.c +++ b/ext/speex/gstspeexdec.c @@ -375,8 +375,8 @@ gst_speex_dec_parse_data (GstSpeexDec * dec, GstBuffer * buf) fpp = dec->header->frames_per_packet; bits = &dec->bits; - GST_DEBUG_OBJECT (dec, "received buffer of size %u, fpp %d, %d bits", - size, fpp, speex_bits_remaining (bits)); + GST_DEBUG_OBJECT (dec, "received buffer of size %" G_GSIZE_FORMAT + ", fpp %d, %d bits", size, fpp, speex_bits_remaining (bits)); } else { /* FIXME ? actually consider how much concealment is needed */ /* concealment data, pass NULL as the bits parameters */ diff --git a/ext/speex/gstspeexenc.c b/ext/speex/gstspeexenc.c index f427f08826..01202ea850 100644 --- a/ext/speex/gstspeexenc.c +++ b/ext/speex/gstspeexenc.c @@ -491,7 +491,7 @@ gst_speex_enc_setup (GstSpeexEnc * enc) static GstFlowReturn gst_speex_enc_push_buffer (GstSpeexEnc * enc, GstBuffer * buffer) { - GST_DEBUG_OBJECT (enc, "pushing output buffer of size %u", + GST_DEBUG_OBJECT (enc, "pushing output buffer of size %" G_GSIZE_FORMAT, gst_buffer_get_size (buffer)); return gst_pad_push (GST_AUDIO_ENCODER_SRC_PAD (enc), buffer); @@ -720,7 +720,7 @@ gst_speex_enc_handle_frame (GstAudioEncoder * benc, GstBuffer * buf) enc->header_sent = TRUE; } - GST_DEBUG_OBJECT (enc, "received buffer %p of %u bytes", buf, + GST_DEBUG_OBJECT (enc, "received buffer %p of %" G_GSIZE_FORMAT " bytes", buf, buf ? gst_buffer_get_size (buf) : 0); ret = gst_speex_enc_encode (enc, buf); diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c index 7b2ee76e83..21454ec75d 100644 --- a/sys/v4l2/gstv4l2bufferpool.c +++ b/sys/v4l2/gstv4l2bufferpool.c @@ -144,7 +144,7 @@ gst_v4l2_buffer_pool_alloc_buffer (GstBufferPool * bpool, GstBuffer ** buffer, index = pool->num_allocated; - GST_LOG_OBJECT (pool, "creating buffer %u, %p", index, newbuf, pool); + GST_LOG_OBJECT (pool, "creating buffer %u, %p", index, newbuf); meta->vbuffer.index = index; meta->vbuffer.type = obj->type; diff --git a/sys/ximage/gstximagesrc.c b/sys/ximage/gstximagesrc.c index bb6d467163..91e3f1dbec 100644 --- a/sys/ximage/gstximagesrc.c +++ b/sys/ximage/gstximagesrc.c @@ -541,7 +541,7 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc) if (!have_frame) { GST_LOG_OBJECT (ximagesrc, - "Copying from last frame ximage->size: %d", + "Copying from last frame ximage->size: %" G_GSIZE_FORMAT, gst_buffer_get_size (ximage)); copy_buffer (ximage, ximagesrc->last_ximage); have_frame = TRUE; @@ -603,7 +603,7 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc) } while (XPending (ximagesrc->xcontext->disp)); if (!have_frame) { GST_LOG_OBJECT (ximagesrc, - "Copying from last frame ximage->size: %d", + "Copying from last frame ximage->size: %" G_GSIZE_FORMAT, gst_buffer_get_size (ximage)); copy_buffer (ximage, ximagesrc->last_ximage); }