Fix build warnings 17/62417/2 accepted/tizen/3.0/ivi/20161011.044412 accepted/tizen/3.0/mobile/20161015.033544 accepted/tizen/3.0/tv/20161016.004924 accepted/tizen/common/20160408.185555 accepted/tizen/ivi/20160408.105437 accepted/tizen/mobile/20160408.105230 accepted/tizen/tv/20160408.105316 submit/tizen/20160408.070341 submit/tizen_3.0_ivi/20161010.000003 submit/tizen_3.0_mobile/20161015.000003 submit/tizen_3.0_tv/20161015.000003
authorGilbok Lee <gilbok.lee@samsung.com>
Wed, 16 Mar 2016 04:39:37 +0000 (13:39 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Fri, 18 Mar 2016 08:24:28 +0000 (17:24 +0900)
Change-Id: Icfc29959faafe7dda1278dce769adcc9bf3b8ebb
Signed-off-by: Gilbok Lee <gilbok.lee@samsung.com>
packaging/libmm-transcode.spec
transcode/mm_transcode_pipeline.c
transcode/mm_transcode_seek.c

index 4ac3062..9c446fd 100644 (file)
@@ -43,7 +43,7 @@ cp %{SOURCE1001} .
 %build
 ./autogen.sh
 
-CFLAGS="$CFLAGS -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" -D_MM_PROJECT_FLOATER" \
+CFLAGS="$CFLAGS -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" -D_MM_PROJECT_FLOATER -Werror" \
 LDFLAGS+="-Wl,--rpath=%{_libdir} -Wl,--hash-style=both -Wl,--as-needed" \
 %configure
 
index fa2003e..574d76c 100755 (executable)
@@ -123,19 +123,22 @@ int _mm_cleanup_pipeline(handle_s *handle)
        }
 
        if (handle->property->thread_mutex) {
-               g_mutex_free(handle->property->thread_mutex);
+               g_mutex_clear(handle->property->thread_mutex);
+               g_free(handle->property->thread_mutex);
                handle->property->thread_mutex = NULL;
                debug_log("Success - free (thread_mutex)");
        }
 
        if (handle->property->thread_cond) {
-               g_cond_free(handle->property->thread_cond);
+               g_cond_clear(handle->property->thread_cond);
+               g_free(handle->property->thread_cond);
                handle->property->thread_cond = NULL;
                debug_log("Success - free (thread_cond)");
        }
 
        if (handle->property->thread_exit_mutex) {
-               g_mutex_free(handle->property->thread_exit_mutex);
+               g_mutex_clear(handle->property->thread_exit_mutex);
+               g_free(handle->property->thread_exit_mutex);
                handle->property->thread_exit_mutex = NULL;
                debug_log("Success - free (thread_exit_mutex)");
        }
index b198539..0b9a45b 100755 (executable)
@@ -1210,14 +1210,16 @@ int _mm_transcode_thread(handle_s *handle)
        }
 
        if (!handle->property->thread_mutex) {
-               handle->property->thread_mutex = g_mutex_new();
+               handle->property->thread_mutex = g_new(GMutex, 1);
+               g_mutex_init(handle->property->thread_mutex);
                debug_log("create thread_mutex: 0x%2x", handle->property->thread_mutex);
        } else {
                debug_error("ERROR - thread_mutex is already created");
        }
 
        if (!handle->property->thread_exit_mutex) {
-               handle->property->thread_exit_mutex = g_mutex_new();
+               handle->property->thread_exit_mutex = g_new(GMutex, 1);
+               g_mutex_init(handle->property->thread_exit_mutex);
                debug_log("create exit mutex: 0x%2x", handle->property->thread_exit_mutex);
        } else {
                debug_error("ERROR - thread_exit_mutex is already created");
@@ -1232,7 +1234,8 @@ int _mm_transcode_thread(handle_s *handle)
        }
 
        if (!handle->property->thread_cond) {
-               handle->property->thread_cond = g_cond_new();
+               handle->property->thread_cond = g_new(GCond, 1);
+               g_cond_init(handle->property->thread_cond);
                debug_log("create thread cond: 0x%2x", handle->property->thread_cond);
        } else {
                debug_error("thread cond is already created");
@@ -1240,7 +1243,7 @@ int _mm_transcode_thread(handle_s *handle)
 
        /* create threads */
        debug_log("create thread");
-       handle->property->thread = g_thread_create((GThreadFunc)_mm_transcode_thread_repeate, (gpointer)handle, TRUE, NULL);
+       handle->property->thread = g_thread_new(NULL, (GThreadFunc)_mm_transcode_thread_repeate, (gpointer)handle);
        if (!handle->property->thread) {
                debug_error("ERROR - create thread");
                return MM_ERROR_TRANSCODE_INTERNAL;