From 07647f3505f1d72bddcb40d03448ad46df6a4d3e Mon Sep 17 00:00:00 2001 From: Youngjae Shin Date: Tue, 2 Jun 2020 17:00:51 +0900 Subject: [PATCH] fix invalid typecasting on 64bit Change-Id: I2453277e2c92e53f6a6e7f8cdc6431ead66dcaff --- tests/sstt_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sstt_main.c b/tests/sstt_main.c index 6b8ccdd..2bffe7a 100644 --- a/tests/sstt_main.c +++ b/tests/sstt_main.c @@ -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; } -- 2.34.1