Fix invalid assignment with unsigned values 72/291372/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 18 Oct 2022 08:09:09 +0000 (17:09 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Fri, 14 Apr 2023 02:50:13 +0000 (11:50 +0900)
Change-Id: I8194de2767bea1d87cb4eceefd599ba9ef6dc0c4

backends/dummy/tdm_dummy_display.c
backends/virtual/tdm_virtual_display.c
src/tdm_event_loop.c

index a43c8c9..f2ef815 100644 (file)
@@ -87,7 +87,7 @@ _tdm_dummy_display_cb_timeout(void *user_data)
 {
        tdm_dummy_output_data *output_data = user_data;
        tdm_dummy_event_data *e = NULL, *ee = NULL;
-       unsigned int tv_sec, tv_usec;
+       long tv_sec, tv_usec;
        static unsigned int sequence = 0;
        struct timespec tp;
 
@@ -102,7 +102,7 @@ _tdm_dummy_display_cb_timeout(void *user_data)
 
        LIST_FOR_EACH_ENTRY_SAFE(e, ee, &output_data->timer_event_list, link) {
                LIST_DEL(&e->link);
-               _tdm_dummy_display_cb_event(output_data, e, sequence, tv_sec, tv_usec);
+               _tdm_dummy_display_cb_event(output_data, e, sequence, (unsigned int)tv_sec, (unsigned int)tv_usec);
                free(e);
        }
 
index 03d0c0e..a4d523d 100644 (file)
@@ -40,7 +40,7 @@ _tdm_virtual_display_cb_event(tdm_virtual_output_data *output_data, tdm_virtual_
        }
 }
 
-static void _tdm_virtual_get_current_time(unsigned int *tv_sec, unsigned int *tv_usec)
+static void _tdm_virtual_get_current_time(long *tv_sec, long *tv_usec)
 {
        struct timespec tp;
 
@@ -57,7 +57,7 @@ _tdm_virtual_display_cb_timeout(void *user_data)
 {
        tdm_virtual_output_data *output_data = user_data;
        tdm_virtual_event_data *e = NULL, *ee = NULL;
-       unsigned int tv_sec, tv_usec;
+       long tv_sec, tv_usec;
        static unsigned int sequence = 0;
 
        sequence++;
@@ -66,7 +66,7 @@ _tdm_virtual_display_cb_timeout(void *user_data)
 
        LIST_FOR_EACH_ENTRY_SAFE(e, ee, &output_data->timer_event_list, link) {
                LIST_DEL(&e->link);
-               _tdm_virtual_display_cb_event(output_data, e, sequence, tv_sec, tv_usec);
+               _tdm_virtual_display_cb_event(output_data, e, sequence, (unsigned int)tv_sec, (unsigned int)tv_usec);
                free(e);
        }
 
@@ -964,7 +964,7 @@ virtual_voutput_commit_done(tdm_voutput *voutput)
 {
        tdm_virtual_voutput_data *voutput_data = voutput;
        tdm_virtual_output_data *output_data = NULL;
-       unsigned int tv_sec, tv_usec;
+       long tv_sec, tv_usec;
        static unsigned int sequence = 0;
        tdm_virtual_event_data *event_data;
        tdm_error ret = TDM_ERROR_NONE;
index 495ef60..7768371 100644 (file)
@@ -521,7 +521,7 @@ _trace_cb_client_destroy(struct wl_listener *listener, void *data)
 {
        struct wl_client *client = (struct wl_client *) data;
        struct timespec tp;
-       unsigned int time;
+       long time;
        pid_t pid = -1;
        const char *proc_name;
        char temp[512] = { 0, }, *p = temp;
@@ -598,7 +598,7 @@ _trace_protocol_logger_cb(void *user_data,
        struct wl_client *client = wl_resource_get_client(message->resource);
        const char *signature = message->message->signature;
        struct timespec tp;
-       unsigned int time;
+       long time;
        pid_t pid = -1;
        const char *proc_name;
        char temp[512] = { 0, }, *p = temp;