From: Gwenole Beauchesne Date: Thu, 2 Jan 2014 10:17:28 +0000 (+0100) Subject: Fix printf()-like formats. X-Git-Tag: 1.19.3~503^2~2298 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=33bb859228d1767573ed0bfdbdac92d69c29c98a;p=platform%2Fupstream%2Fgstreamer.git Fix printf()-like formats. Fix formts for various GST_DEBUG et al. invocations. More precisely, make size_t arguments use the %zu format specifier accordingly; force XID formats to be a 32-bit unsigned integer; and fix the format used for gst_vaapi_create_surface_with_format() error cases since we have been using strings nowadays. --- diff --git a/gst-libs/gst/vaapi/gstvaapidecoder.c b/gst-libs/gst/vaapi/gstvaapidecoder.c index 6df5ba8..8a8fa4c 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder.c @@ -101,7 +101,7 @@ push_buffer(GstVaapiDecoder *decoder, GstBuffer *buffer) GST_BUFFER_FLAG_SET(buffer, GST_BUFFER_FLAG_EOS); } - GST_DEBUG("queue encoded data buffer %p (%d bytes)", + GST_DEBUG("queue encoded data buffer %p (%zu bytes)", buffer, gst_buffer_get_size(buffer)); g_async_queue_push(decoder->buffers, buffer); @@ -117,7 +117,7 @@ pop_buffer(GstVaapiDecoder *decoder) if (!buffer) return NULL; - GST_DEBUG("dequeue buffer %p for decoding (%d bytes)", + GST_DEBUG("dequeue buffer %p for decoding (%zu bytes)", buffer, gst_buffer_get_size(buffer)); return buffer; diff --git a/gst-libs/gst/vaapi/gstvaapipixmap_x11.c b/gst-libs/gst/vaapi/gstvaapipixmap_x11.c index 8031383..ac84a76 100644 --- a/gst-libs/gst/vaapi/gstvaapipixmap_x11.c +++ b/gst-libs/gst/vaapi/gstvaapipixmap_x11.c @@ -208,7 +208,7 @@ gst_vaapi_pixmap_x11_new(GstVaapiDisplay *display, GstVideoFormat format, GstVaapiPixmap * gst_vaapi_pixmap_x11_new_with_xid(GstVaapiDisplay *display, Pixmap xid) { - GST_DEBUG("new pixmap from xid 0x%08x", xid); + GST_DEBUG("new pixmap from xid 0x%08x", (guint)xid); g_return_val_if_fail(GST_VAAPI_IS_DISPLAY_X11(display), NULL); g_return_val_if_fail(xid != None, NULL); diff --git a/gst-libs/gst/vaapi/gstvaapisurface.c b/gst-libs/gst/vaapi/gstvaapisurface.c index 564c3a9..902926d 100644 --- a/gst-libs/gst/vaapi/gstvaapisurface.c +++ b/gst-libs/gst/vaapi/gstvaapisurface.c @@ -187,7 +187,7 @@ gst_vaapi_surface_create_with_format(GstVaapiSurface *surface, /* ERRORS */ error_unsupported_format: - GST_ERROR("unsupported format %u", gst_vaapi_video_format_to_string(format)); + GST_ERROR("unsupported format %s", gst_vaapi_video_format_to_string(format)); return FALSE; #else return FALSE; diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_glx.c b/gst-libs/gst/vaapi/gstvaapiwindow_glx.c index 707a524..d027eae 100644 --- a/gst-libs/gst/vaapi/gstvaapiwindow_glx.c +++ b/gst-libs/gst/vaapi/gstvaapiwindow_glx.c @@ -400,7 +400,7 @@ gst_vaapi_window_glx_new_with_xid(GstVaapiDisplay *display, Window xid) { GstVaapiWindow *window; - GST_DEBUG("new window from xid 0x%08x", xid); + GST_DEBUG("new window from xid 0x%08x", (guint)xid); g_return_val_if_fail(GST_VAAPI_IS_DISPLAY_GLX(display), NULL); g_return_val_if_fail(xid != None, NULL); diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_x11.c b/gst-libs/gst/vaapi/gstvaapiwindow_x11.c index d399943..f0a5170 100644 --- a/gst-libs/gst/vaapi/gstvaapiwindow_x11.c +++ b/gst-libs/gst/vaapi/gstvaapiwindow_x11.c @@ -626,7 +626,7 @@ gst_vaapi_window_x11_new(GstVaapiDisplay *display, guint width, guint height) GstVaapiWindow * gst_vaapi_window_x11_new_with_xid(GstVaapiDisplay *display, Window xid) { - GST_DEBUG("new window from xid 0x%08x", xid); + GST_DEBUG("new window from xid 0x%08x", (guint)xid); g_return_val_if_fail(GST_VAAPI_IS_DISPLAY_X11(display), NULL); g_return_val_if_fail(xid != None, NULL); diff --git a/gst/vaapi/gstvaapiencode.c b/gst/vaapi/gstvaapiencode.c index d1afc44..32e01cb 100644 --- a/gst/vaapi/gstvaapiencode.c +++ b/gst/vaapi/gstvaapiencode.c @@ -122,7 +122,7 @@ gst_vaapiencode_default_allocate_buffer (GstVaapiEncode * encode, /* ERRORS */ error_invalid_buffer: { - GST_ERROR ("invalid GstVaapiCodedBuffer size (%d)", buf_size); + GST_ERROR ("invalid GstVaapiCodedBuffer size (%d bytes)", buf_size); return GST_VAAPI_ENCODE_FLOW_MEM_ERROR; } error_create_buffer: @@ -202,7 +202,7 @@ gst_vaapiencode_push_frame (GstVaapiEncode * encode, gint64 timeout) } GST_VIDEO_ENCODER_STREAM_UNLOCK (encode); - GST_DEBUG ("output:%" GST_TIME_FORMAT ", size:%d", + GST_DEBUG ("output:%" GST_TIME_FORMAT ", size:%zu", GST_TIME_ARGS (out_frame->pts), gst_buffer_get_size (out_buffer)); return gst_video_encoder_finish_frame (venc, out_frame);