From 113443d34233f56279aa7aea2abe198e96247b5b Mon Sep 17 00:00:00 2001 From: Jeongmo Yang Date: Thu, 12 Oct 2017 16:45:07 +0900 Subject: [PATCH] Fix build warning 1. -Wformat 2. -Wformat-extra-args [Version] 0.10.138 [Profile] Common [Issue Type] Build warning [Dependency module] N/A Change-Id: Ieefa05a57ba7f73d18e1257d0e80741dbe9e2f5b Signed-off-by: Jeongmo Yang --- packaging/libmm-camcorder.spec | 2 +- src/mm_camcorder_attribute.c | 2 +- src/mm_camcorder_audiorec.c | 4 ++-- src/mm_camcorder_gstcommon.c | 24 ++++++++++++------------ src/mm_camcorder_internal.c | 2 +- src/mm_camcorder_util.c | 2 +- src/mm_camcorder_videorec.c | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packaging/libmm-camcorder.spec b/packaging/libmm-camcorder.spec index 3d981be..b86a802 100644 --- a/packaging/libmm-camcorder.spec +++ b/packaging/libmm-camcorder.spec @@ -1,6 +1,6 @@ Name: libmm-camcorder Summary: Camera and recorder library -Version: 0.10.137 +Version: 0.10.138 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/mm_camcorder_attribute.c b/src/mm_camcorder_attribute.c index 09031e9..c61cff0 100644 --- a/src/mm_camcorder_attribute.c +++ b/src/mm_camcorder_attribute.c @@ -1747,7 +1747,7 @@ _mmcamcorder_set_attributes(MMHandleType handle, char **err_attr_name, const cha if (attrs) { ret = __mmcamcorder_check_valid_pair(handle, err_attr_name, attribute_name, var_args); } else { - _mmcam_dbg_err("handle 0x%x, attrs is NULL, attr name [%s]", handle, attribute_name); + _mmcam_dbg_err("handle %p, attrs is NULL, attr name [%s]", handle, attribute_name); ret = MM_ERROR_CAMCORDER_NOT_INITIALIZED; } diff --git a/src/mm_camcorder_audiorec.c b/src/mm_camcorder_audiorec.c index 5bc22d1..6206c0e 100644 --- a/src/mm_camcorder_audiorec.c +++ b/src/mm_camcorder_audiorec.c @@ -433,7 +433,7 @@ _mmcamcorder_audio_command(MMHandleType handle, int command) /* MSDOS_SUPER_MAGIC : 0x4d44 */ if (file_system_type == MSDOS_SUPER_MAGIC && (info->max_size == 0 || info->max_size > FAT32_FILE_SYSTEM_MAX_SIZE)) { - _mmcam_dbg_warn("FAT32 and too large max[%"G_GUINT64_FORMAT"], set max as %"G_GUINT64_FORMAT, + _mmcam_dbg_warn("FAT32 and too large max[%"G_GUINT64_FORMAT"], set max as %lu", info->max_size, FAT32_FILE_SYSTEM_MAX_SIZE); info->max_size = FAT32_FILE_SYSTEM_MAX_SIZE; } else { @@ -983,7 +983,7 @@ static GstPadProbeReturn __mmcamcorder_audio_dataprobe_record(GstPad *pad, GstPa msg.param.recording_status.remained_time = 0; _mmcamcorder_send_message((MMHandleType)hcamcorder, &msg); - _mmcam_dbg_warn("Last filesize sent by message : %d", audioinfo->filesize + trailer_size); + _mmcam_dbg_warn("Last filesize sent by message : %"G_GUINT64_FORMAT, audioinfo->filesize + trailer_size); sc->isMaxsizePausing = TRUE; msg.id = MM_MESSAGE_CAMCORDER_MAX_SIZE; diff --git a/src/mm_camcorder_gstcommon.c b/src/mm_camcorder_gstcommon.c index 9d3b27c..e4619bf 100644 --- a/src/mm_camcorder_gstcommon.c +++ b/src/mm_camcorder_gstcommon.c @@ -1698,7 +1698,7 @@ static GstPadProbeReturn __mmcamcorder_video_dataprobe_preview(GstPad *pad, GstP stream.data.yuv420sp.uv = mm_buf->data[1]; stream.data.yuv420sp.length_uv = stream.data.yuv420sp.length_y >> 1; /* - _mmcam_dbg_log("format[%d][num_planes:%d] [Y]p:0x%x,size:%d [UV]p:0x%x,size:%d", + _mmcam_dbg_log("format[%d][num_planes:%d] [Y]p:%p,size:%d [UV]p:%p,size:%d", stream.format, stream.num_planes, stream.data.yuv420sp.y, stream.data.yuv420sp.length_y, stream.data.yuv420sp.uv, stream.data.yuv420sp.length_uv); @@ -1713,7 +1713,7 @@ static GstPadProbeReturn __mmcamcorder_video_dataprobe_preview(GstPad *pad, GstP stream.data.yuv420p.v = mm_buf->data[2]; stream.data.yuv420p.length_v = stream.data.yuv420p.length_u; /* - _mmcam_dbg_log("S420[num_planes:%d] [Y]p:0x%x,size:%d [U]p:0x%x,size:%d [V]p:0x%x,size:%d", + _mmcam_dbg_log("S420[num_planes:%d] [Y]p:%p,size:%d [U]p:%p,size:%d [V]p:%p,size:%d", stream.num_planes, stream.data.yuv420p.y, stream.data.yuv420p.length_y, stream.data.yuv420p.u, stream.data.yuv420p.length_u, @@ -1735,7 +1735,7 @@ static GstPadProbeReturn __mmcamcorder_video_dataprobe_preview(GstPad *pad, GstP stream.stride[1] = stream.width; stream.elevation[1] = stream.height >> 1; /* - _mmcam_dbg_log("format[%d][num_planes:%d] [Y]p:0x%x,size:%d [UV]p:0x%x,size:%d", + _mmcam_dbg_log("format[%d][num_planes:%d] [Y]p:%p,size:%d [UV]p:%p,size:%d", stream.format, stream.num_planes, stream.data.yuv420sp.y, stream.data.yuv420sp.length_y, stream.data.yuv420sp.uv, stream.data.yuv420sp.length_uv); @@ -1756,7 +1756,7 @@ static GstPadProbeReturn __mmcamcorder_video_dataprobe_preview(GstPad *pad, GstP stream.stride[2] = stream.width >> 1; stream.elevation[2] = stream.height >> 1; /* - _mmcam_dbg_log("I420[num_planes:%d] [Y]p:0x%x,size:%d [U]p:0x%x,size:%d [V]p:0x%x,size:%d", + _mmcam_dbg_log("I420[num_planes:%d] [Y]p:%p,size:%d [U]p:%p,size:%d [V]p:%p,size:%d", stream.num_planes, stream.data.yuv420p.y, stream.data.yuv420p.length_y, stream.data.yuv420p.u, stream.data.yuv420p.length_u, @@ -1783,9 +1783,10 @@ static GstPadProbeReturn __mmcamcorder_video_dataprobe_preview(GstPad *pad, GstP stream.data_type = MM_CAM_STREAM_DATA_ENCODED; stream.data.encoded.data = mapinfo.data; stream.data.encoded.length_data = stream.length_total; - _mmcam_dbg_log("H264[num_planes:%d] [0]p:0x%x,size:%d", - fourcc, fourcc>>8, fourcc>>16, fourcc>>24, stream.num_planes, - stream.data.encoded.data, stream.data.encoded.length_data); + /* + _mmcam_dbg_log("H264[num_planes:%d] [0]p:%p,size:%d", + stream.num_planes, stream.data.encoded.data, stream.data.encoded.length_data); + */ } else { stream.data_type = MM_CAM_STREAM_DATA_YUV420; stream.data.yuv420.yuv = mapinfo.data; @@ -1796,7 +1797,7 @@ static GstPadProbeReturn __mmcamcorder_video_dataprobe_preview(GstPad *pad, GstP stream.num_planes = 1; /* - _mmcam_dbg_log("%c%c%c%c[num_planes:%d] [0]p:0x%x,size:%d", + _mmcam_dbg_log("%c%c%c%c[num_planes:%d] [0]p:%p,size:%d", fourcc, fourcc>>8, fourcc>>16, fourcc>>24, stream.num_planes, stream.data.yuv420.yuv, stream.data.yuv420.length_yuv); */ @@ -2726,7 +2727,7 @@ bool _mmcamcorder_set_videosrc_stabilization(MMHandleType handle, int stabilizat if (sc->info_image->preview_format == MM_PIXEL_FORMAT_NV12 && video_width >= 1080 && video_height >= 720) { _mmcam_dbg_log("NV12, video size %dx%d, ENABLE video stabilization", - video_width, video_height, stabilization); + video_width, video_height); /* set vdis mode */ g_object_set(G_OBJECT(v_src), "enable-vdis-mode", TRUE, @@ -2807,12 +2808,11 @@ bool _mmcamcorder_set_encoded_preview_bitrate(MMHandleType handle, int bitrate) CameraControl = GST_CAMERA_CONTROL(sc->element[_MMCAMCORDER_VIDEOSRC_SRC].gst); controls = gst_camera_control_list_channels(CameraControl); - _mmcam_dbg_log("controls : 0x%x", controls); + _mmcam_dbg_log("controls : %p", controls); if (controls != NULL) { - _mmcam_dbg_log("controls : 0x%x", controls); for (item = controls ; item && item->data ; item = item->next) { CameraControlChannel = item->data; - _mmcam_dbg_log("label : %d", CameraControlChannel->label); + _mmcam_dbg_log("label : %s", CameraControlChannel->label); if (!strcmp(CameraControlChannel->label, "bitrate")) { _mmcam_dbg_log("set encoded preview bitrate %d", bitrate); return gst_camera_control_set_value(CameraControl, CameraControlChannel, bitrate); diff --git a/src/mm_camcorder_internal.c b/src/mm_camcorder_internal.c index a7e5151..d9daaaa 100644 --- a/src/mm_camcorder_internal.c +++ b/src/mm_camcorder_internal.c @@ -3528,7 +3528,7 @@ int _mmcamcorder_create_pipeline(MMHandleType handle, int type) _MMCamcorderSubContext *sc = NULL; GstElement *pipeline = NULL; - _mmcam_dbg_log("handle : %x, type : %d", handle, type); + _mmcam_dbg_log("handle : %p, type : %d", handle, type); mmf_return_val_if_fail(hcamcorder, MM_ERROR_CAMCORDER_NOT_INITIALIZED); diff --git a/src/mm_camcorder_util.c b/src/mm_camcorder_util.c index 55de4a2..8fef249 100644 --- a/src/mm_camcorder_util.c +++ b/src/mm_camcorder_util.c @@ -1752,7 +1752,7 @@ gboolean _mmcamcorder_resize_frame(unsigned char *src_data, unsigned int src_wid input_format = MM_UTIL_IMG_FMT_RGB888; break; default: - _mmcam_dbg_err("NOT supported format", src_format); + _mmcam_dbg_err("NOT supported format [%d]", src_format); return FALSE; } diff --git a/src/mm_camcorder_videorec.c b/src/mm_camcorder_videorec.c index 4e7b7fb..b3b0878 100644 --- a/src/mm_camcorder_videorec.c +++ b/src/mm_camcorder_videorec.c @@ -664,7 +664,7 @@ int _mmcamcorder_video_command(MMHandleType handle, int command) /* MSDOS_SUPER_MAGIC : 0x4d44 */ if (file_system_type == MSDOS_SUPER_MAGIC && (info->max_size == 0 || info->max_size > FAT32_FILE_SYSTEM_MAX_SIZE)) { - _mmcam_dbg_warn("FAT32 and too large max[%"G_GUINT64_FORMAT"], set max as %"G_GUINT64_FORMAT, + _mmcam_dbg_warn("FAT32 and too large max[%"G_GUINT64_FORMAT"], set max as %lu", info->max_size, FAT32_FILE_SYSTEM_MAX_SIZE); info->max_size = FAT32_FILE_SYSTEM_MAX_SIZE; } else { -- 2.7.4