Fix SVACE defect (SEC_DO_NOT_CAST_POINTER_TO_INT) 31/283231/1 accepted/tizen/unified/20221102.020520
authorSeungbae Shin <seungbae.shin@samsung.com>
Thu, 20 Oct 2022 12:29:48 +0000 (21:29 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Thu, 20 Oct 2022 12:29:48 +0000 (21:29 +0900)
[Version] 0.2.7
[Issue Type] Svace

Change-Id: Icc4f6caa8ff339c2592c3e82b9281bd2434cc379

packaging/capi-media-tone-player.spec
test/tone_player_test.c

index 69a3247..ab86ebc 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-media-tone-player
 Summary:    A tone player library in Tizen C API
-Version:    0.2.6
+Version:    0.2.7
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index f3addc4..88881ca 100755 (executable)
@@ -47,7 +47,7 @@ static gpointer _g_mainloop_thread(gpointer data)
 
 static gboolean _g_timeout_cb(gpointer data)
 {
-       int id = (int)data;
+       int id = GPOINTER_TO_INT(data);
        int ret = 0;
 
        g_print("< Stopping id(%d), ", id);
@@ -100,7 +100,7 @@ static void _tone_play_test(int from, int to, int duration, int sleep_time)
                g_print("gid(%d) ", gid);
 
                if (duration != sleep_time)
-                       g_timeout_add(sleep_time, _g_timeout_cb, (void *)gid);
+                       g_timeout_add(sleep_time, _g_timeout_cb, GINT_TO_POINTER(gid));
 
                for (j = 0; j < sleep_time / 100; j++) {
                        g_print(".");