summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeongmo Yang <jm80.yang@samsung.com>2020-06-17 14:40:52 +0900
committerJeongmo Yang <jm80.yang@samsung.com>2020-06-17 15:50:29 +0900
commitbb5962716df8450973f921400e3d30dae104e127 (patch)
treeda7169dc44ebb70b57caa720351f433024d1adcd
parent6cc973d212f36da2e3414f7be31a7223f3f64f1c (diff)
downloadcamera-bb5962716df8450973f921400e3d30dae104e127.tar.gz
camera-bb5962716df8450973f921400e3d30dae104e127.tar.bz2
camera-bb5962716df8450973f921400e3d30dae104e127.zip
: -Wsign-compare : -Wstringop-truncation : -Wdeprecated-declarations : -Wcast-function-type [Version] 0.4.34 [Profile] Common Change-Id: Ia0a211d69aef052b55208ba3f6fff05d5f0142ba Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rw-r--r--packaging/capi-media-camera.spec2
-rw-r--r--src/camera.c4
-rw-r--r--test/camera_test.c16
3 files changed, 11 insertions, 11 deletions
diff --git a/packaging/capi-media-camera.spec b/packaging/capi-media-camera.spec
index a7b2bba..a17a973 100644
--- a/packaging/capi-media-camera.spec
+++ b/packaging/capi-media-camera.spec
@@ -1,6 +1,6 @@
Name: capi-media-camera
Summary: A Camera API
-Version: 0.4.33
+Version: 0.4.34
Release: 0
Group: Multimedia/API
License: Apache-2.0
diff --git a/src/camera.c b/src/camera.c
index b958ac4..6878d5f 100644
--- a/src/camera.c
+++ b/src/camera.c
@@ -1761,7 +1761,7 @@ static gpointer _camera_msg_handler_func(gpointer data)
cam_idle_event->event = cam_msg->event;
cam_idle_event->cb_info = cb_info;
- strncpy(cam_idle_event->recv_msg, cam_msg->recv_msg, sizeof(cam_idle_event->recv_msg) - 1);
+ strncpy(cam_idle_event->recv_msg, cam_msg->recv_msg, sizeof(cam_idle_event->recv_msg));
memcpy(cam_idle_event->tfd, cam_msg->tfd, sizeof(cam_idle_event->tfd));
/*LOGD("t:%d add camera event[%d, %p] to IDLE", type, cam_msg->event, cam_idle_event);*/
@@ -3172,7 +3172,7 @@ int camera_set_display(camera_h camera, camera_display_type_e type, camera_displ
}
mm_ret = mm_display_interface_set_display(cb_info->dp_interface, type, display, &dp_info->parent_id);
- if (mm_ret == MM_ERROR_NOT_SUPPORT_API) {
+ if (mm_ret == (int)MM_ERROR_NOT_SUPPORT_API) {
LOGE("[NOT_SUPPORTED] type %d", type);
return CAMERA_ERROR_NOT_SUPPORTED;
} else if (mm_ret != MM_ERROR_NONE) {
diff --git a/test/camera_test.c b/test/camera_test.c
index f92cdfa..3fe61eb 100644
--- a/test/camera_test.c
+++ b/test/camera_test.c
@@ -65,9 +65,9 @@ camera_device_e cam_info;
static GTimer *timer;
static int g_camera_device_changed_cb_id;
-GTimeVal previous_time;
-GTimeVal current_time;
-GTimeVal result_time;
+static struct timeval previous_time;
+static struct timeval current_time;
+static struct timeval result_time;
/*-----------------------------------------------------------------------
| GLOBAL CONSTANT DEFINITIONS: |
@@ -382,7 +382,7 @@ const char *facing_direction[] = {
| LOCAL FUNCTION PROTOTYPES: |
---------------------------------------------------------------------------*/
static void print_menu();
-static gboolean cmd_input(GIOChannel *channel);
+static gboolean cmd_input(GIOChannel *channel, GIOCondition condition, gpointer data);
static gboolean mode_change(gchar buf);
int camcordertest_set_attr_int(const char* attr_subcategory, int value);
@@ -393,7 +393,7 @@ static inline void flush_stdin()
while ((ch = getchar()) != EOF && ch != '\n');
}
-static bool _release_idle_event_callback(void *data)
+static gboolean _release_idle_event_callback(void *data)
{
g_print("destroy camera handle\n\n");
@@ -1317,7 +1317,7 @@ static void setting_menu(gchar buf)
* @remark
* @see
*/
-static gboolean cmd_input(GIOChannel *channel)
+static gboolean cmd_input(GIOChannel *channel, GIOCondition condition, gpointer data)
{
gchar *buf = NULL;
gsize read_size;
@@ -1442,7 +1442,7 @@ static gboolean mode_change(gchar buf)
g_print("\n[camcorder_create - type %d]\n", cam_info);
- g_get_current_time(&previous_time);
+ gettimeofday(&previous_time, NULL);
g_timer_reset(timer);
@@ -1495,7 +1495,7 @@ static gboolean mode_change(gchar buf)
camera_start_preview(hcamcorder->camera);
- g_get_current_time(&current_time);
+ gettimeofday(&current_time, NULL);
timersub(&current_time, &previous_time, &result_time);
g_print("\n\tCamera Starting Time : %ld.%lds\n", result_time.tv_sec, result_time.tv_usec);