Fix invalid format usage 99/194799/2 accepted/tizen/unified/20181210.152233 submit/tizen/20181210.020401
authorJeongmo Yang <jm80.yang@samsung.com>
Fri, 7 Dec 2018 07:37:17 +0000 (16:37 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Fri, 7 Dec 2018 08:53:26 +0000 (17:53 +0900)
[Version] 0.0.3
[Profile] Common
[Issue Type] Bug fix
[Dependency module] N/A

Change-Id: I1845061b43cf8f662a469d482905fc69590df7c9
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/camera-hal-v4l2.spec
src/tizen_camera_v4l2.c

index f589367..f0ed83b 100644 (file)
@@ -1,6 +1,6 @@
 Name:       camera-hal-v4l2
 Summary:    Tizen Camera Hal for V4L2
-Version:    0.0.2
+Version:    0.0.3
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index fb7c87e..5184ac1 100644 (file)
@@ -445,7 +445,7 @@ static int _camera_get_device_info(int device_index, int device_fd, camera_devic
                                        v4l2_frame.stepwise.max_height);
                                break;
                        case V4L2_FRMSIZE_TYPE_STEPWISE:
-                               LOGW("\t\tsize[%d] %ux%u - %ux%u (step %ux%u)",
+                               LOGW("\t\tsize[%d] %ux%u - %ux%u (step %ux%u)", j,
                                        v4l2_frame.stepwise.min_width,
                                        v4l2_frame.stepwise.min_height,
                                        v4l2_frame.stepwise.max_width,
@@ -528,7 +528,7 @@ static int _camera_get_device_info_list(void)
                }
        }
 
-       LOGD("device node count : %d", glob_buf.gl_pathc);
+       LOGD("device node count : %zu", glob_buf.gl_pathc);
 
        for (i = 0 ; i < glob_buf.gl_pathc ; i++) {
                LOGD("[%d] check device [%s]", i, glob_buf.gl_pathv[i]);
@@ -1165,7 +1165,7 @@ int camera_set_preview_stream_format(void *camera_handle, camera_format_t *forma
 
        if (V4L2_TYPE_IS_MULTIPLANAR(handle->v4l2_type)) {
                for (i = 0 ; i < v4l2_fmt.fmt.pix_mp.num_planes ; i++) {
-                       LOGD("plane[%d] stride %d, sizeimage %d",
+                       LOGD("plane[%d] stride %u, sizeimage %u", i,
                                v4l2_fmt.fmt.pix_mp.plane_fmt[i].bytesperline,
                                v4l2_fmt.fmt.pix_mp.plane_fmt[i].sizeimage);
                }
@@ -1665,7 +1665,7 @@ int camera_set_command(void *camera_handle, int64_t command, void *value)
                return CAMERA_ERROR_INVALID_STATE;
        }
 
-       LOGD("set command %llx - state %d", command, handle->state);
+       LOGD("set command %lx - state %d", command, handle->state);
 
        switch (command) {
        case CAMERA_COMMAND_EXPOSURE:
@@ -1681,12 +1681,12 @@ int camera_set_command(void *camera_handle, int64_t command, void *value)
                cid = V4L2_CID_SHARPNESS;
                break;
        default:
-               LOGE("NOT_SUPPORTED %llx", command);
+               LOGE("NOT_SUPPORTED %lx", command);
                g_mutex_unlock(&handle->lock);
                return CAMERA_ERROR_DEVICE_NOT_SUPPORTED;
        }
 
-       ctrl_ret = _camera_v4l2_s_ctrl(handle->device_fd, cid, (int)value);
+       ctrl_ret = _camera_v4l2_s_ctrl(handle->device_fd, cid, ((int)(long)value));
        if (ctrl_ret < 0) {
                switch (errno) {
                case EACCES:
@@ -1739,7 +1739,7 @@ int camera_get_command(void *camera_handle, int64_t command, void **value)
 
        g_mutex_lock(&handle->lock);
 
-       LOGD("get command %llx - state %d", command, handle->state);
+       LOGD("get command %lx - state %d", command, handle->state);
 
        switch (command) {
        case CAMERA_COMMAND_EXPOSURE:
@@ -1755,7 +1755,7 @@ int camera_get_command(void *camera_handle, int64_t command, void **value)
                cid = V4L2_CID_SHARPNESS;
                break;
        default:
-               LOGE("NOT_SUPPORTED %llx", command);
+               LOGE("NOT_SUPPORTED %lx", command);
                g_mutex_unlock(&handle->lock);
                return CAMERA_ERROR_DEVICE_NOT_SUPPORTED;
        }
@@ -1810,7 +1810,7 @@ int camera_set_batch_command(void *camera_handle, camera_batch_command_control_t
 
        g_mutex_lock(&handle->lock);
 
-       LOGD("set batch command - flag 0x"PRIx64", state %d",
+       LOGD("set batch command - flag 0x%lx, state %d",
                batch_command->command_set_flag, handle->state);
 
        /* TODO: to be implemented */