fix invalid typecasting on 64bit 52/235152/1 submit/tizen/20200602.091451 submit/tizen/20200603.034717
authorYoungjae Shin <yj99.shin@samsung.com>
Tue, 2 Jun 2020 08:00:51 +0000 (17:00 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Tue, 2 Jun 2020 08:00:51 +0000 (17:00 +0900)
Change-Id: I2453277e2c92e53f6a6e7f8cdc6431ead66dcaff

tests/sstt_main.c

index 6b8ccdd..2bffe7a 100644 (file)
@@ -33,7 +33,7 @@ static int thread_sw = 1;
 static void *thread_function(void *data)
 {
        int cnt = 0;
-       int test_idx = (int)data;
+       int test_idx = GPOINTER_TO_INT(data);
 
        while (thread_sw) {
                if (cnt > loop)
@@ -52,7 +52,7 @@ static GThread **unit_test_thread_start(int test_num)
        int i;
        GThread **thread_list = (GThread **)calloc(sizeof(GThread*), N_THREADS);
        for (i = 0; i < N_THREADS; i++)
-               thread_list[i] = g_thread_new(NULL, thread_function, (void*)test_num);
+               thread_list[i] = g_thread_new(NULL, thread_function, GINT_TO_POINTER(test_num));
 
        return thread_list;
 }