[UTC][media-content][Non-ACR] Fix build warnings 50/264650/1
authorMinje Ahn <minje.ahn@samsung.com>
Tue, 28 Sep 2021 00:54:37 +0000 (09:54 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Tue, 28 Sep 2021 00:54:37 +0000 (09:54 +0900)
Change-Id: I793a6b30ed596f2cf486769756d1a8c5b1d5ef80
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
18 files changed:
src/utc/media-content/utc-media-audio.c
src/utc/media-content/utc-media-book.c
src/utc/media-content/utc-media-bookmark-delete.c
src/utc/media-content/utc-media-bookmark-insert.c
src/utc/media-content/utc-media-bookmark.c
src/utc/media-content/utc-media-content.c
src/utc/media-content/utc-media-face.c
src/utc/media-content/utc-media-filter-create.c
src/utc/media-content/utc-media-filter-destroy.c
src/utc/media-content/utc-media-filter.c
src/utc/media-content/utc-media-folder.c
src/utc/media-content/utc-media-group.c
src/utc/media-content/utc-media-image.c
src/utc/media-content/utc-media-info.c
src/utc/media-content/utc-media-playlist.c
src/utc/media-content/utc-media-storage.c
src/utc/media-content/utc-media-tag.c
src/utc/media-content/utc-media-video.c

index ecf70f716d0bc69e76d51ea79ec622a131081221..e2d70bfc72d2dc83be160f63e7f5f4b46ef243b5 100755 (executable)
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
 #include <media_content.h>
-#include <string.h>
+#include <tct_common.h>
 #include <storage.h>
 #include <glib.h>
-#include <unistd.h>
 
 //& set: MediaAudio
 
@@ -49,9 +47,8 @@ static void _scan_folder_cb(media_content_error_e error, void *user_data)
 
 static gboolean _startup_scan_start(gpointer data)
 {
-       int ret = MEDIA_CONTENT_ERROR_NONE;
-
-       ret = media_content_scan_folder(dir_path, TRUE, _scan_folder_cb, NULL);
+       if (media_content_scan_folder(dir_path, TRUE, _scan_folder_cb, NULL) != MEDIA_CONTENT_ERROR_NONE)
+               return false;
 
        return false;
 }
index 48a7d2c304795e599ea591b4ddfe41f9f1ed0b2e..64d80a737737827367211531f4b29867576eba49 100755 (executable)
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
 #include <media_content.h>
-#include <stdlib.h>
-#include <string.h>
+#include <tct_common.h>
 
 //& set: MediaBook
 
index 1fb3ca8cde84d254051a6698650c7509593c51cd..7233036d466f0c0583a0076a10533a93604452b1 100755 (executable)
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
 #include <media_content.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
+#include <tct_common.h>
 #include <storage.h>
 
 //& set: MediaBookmarkDelete
index 425851044d8275d64dcd45431cc14e3f59ee0309..685b70d784d94577357f9795e03293799ce8d829 100755 (executable)
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
 #include <media_content.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
+#include <tct_common.h>
 #include <storage.h>
 
 //& set: MediaBookmarkInsert
index f11f3a7bb4f77281c4abd151efb4859995d5ecad..e8c291e11c7f19328224470cf3507c801ef699ec 100755 (executable)
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
 #include <media_content.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
+#include <tct_common.h>
 #include <storage.h>
 
 //& set: MediaBookmark
@@ -252,7 +249,6 @@ int utc_media_bookmark_foreach_bookmark_from_db_p(void)
        assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
 
        int ret = MEDIA_CONTENT_ERROR_NONE;
-       int bookmark_count = 0;
 
        ret = media_bookmark_foreach_bookmark_from_db(g_filter, sub_bookmark_cb, NULL);
        assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
index 21f5a7c219efbfe331b9c36e1acacd69d7d0daf1..81ac100eeed55f2d313c6c42f97f4df533ea94db 100755 (executable)
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
 #include <media_content.h>
-#include <glib.h>
-#include <unistd.h>
-#include <string.h>
+#include <tct_common.h>
 #include <storage.h>
+#include <glib.h>
 
 //& set: MediaContent
 
 static GMainLoop *g_loop = NULL;
 static const char *g_insert_file = "test.jpg";
 static const char *g_origin_file = "image.jpg";
-static const char *g_user_data = "hi";
 static char *g_insert_path = NULL;
 static char *g_origin_path = NULL;
 static char *dir_path = NULL;
index 599481f09d4a4a5299d5a99eb75e36325efdea32..d8d9342c42bcf87404bc9a31ad72ea7083a8d2fe 100755 (executable)
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
 #include <media_content.h>
-#include <glib.h>
-#include <unistd.h>
-#include <string.h>
+#include <tct_common.h>
 #include <storage.h>
 
 //& set: MediaFace
@@ -106,7 +103,6 @@ void utc_media_face_startup(void)
        g_face_dst = NULL;
        g_media_id = NULL;
        g_face_id = NULL;
-       char *tag = strdup("test");
 
        if (storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE) {
                fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
index 47770cc5c2ed356f6729a5facec2cff808358ae8..9dc3b1105ad787216aa4407f096c62afcc6060a0 100755 (executable)
@@ -13,9 +13,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
 #include <media_content.h>
-#include <stdlib.h>
+#include <tct_common.h>
 
 //& set: MediaFilterCreate
 
index f9ffb10acb21ae62422791ffab67086697fd05e5..9936b04e1be8caa5394858229008d7705e004bcd 100755 (executable)
@@ -13,9 +13,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
 #include <media_content.h>
-#include <stdlib.h>
+#include <tct_common.h>
 
 //& set: MediaFilterDestroy
 
index 0f53ea989f53303a8f4d7af272dd3dcced277c9e..0e85d986af63b9cbafb7f6cafdfe6007d6a1611e 100755 (executable)
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
 #include <media_content.h>
-#include <stdlib.h>
-#include <string.h>
+#include <tct_common.h>
 
 #define SET_TEST_CONDITION "MEDIA_TYPE=3"
 //& set: MediaFilter
index fb7bbd0fb73d6c8b131e4a6d916721462f81b675..9bd5f63a5316f1743599fd110ca41a79c43fb8e7 100755 (executable)
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
 #include <media_content.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
+#include <tct_common.h>
 #include <storage.h>
 
 #define TEST_SET_CONDITION "MEDIA_TYPE=0"
index 0e44eb1a531f8b3b5edf6dd1df1d8829b02aa9b4..535475d2edb716fa5f6cc6087f94cbf785f9015f 100755 (executable)
@@ -13,9 +13,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
-#include <stdlib.h>
 #include <media_content.h>
+#include <tct_common.h>
 
 #define TEST_SET_GROUP_NAME "artist"
 //& set: MediaGroup
index bdd483656dff181c48ee6912a21156199142c408..cc5cc074c11b44a1a893372f4b57223dcd39b155 100755 (executable)
@@ -13,9 +13,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
 #include <media_content.h>
-#include <stdlib.h>
+#include <tct_common.h>
 
 //& set: MediaImage
 
index 1b99ae66a083db46974379fedb6ce4d95a770a3d..295860bcda0301f2c63863713ad4ca70dcd8c453 100755 (executable)
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
 #include <media_content.h>
-#include <stdlib.h>
+#include <tct_common.h>
 #include <glib.h>
-#include <unistd.h>
-#include <string.h>
 #include <storage.h>
-#include <system_info.h>
 
 #define TEST_SET_SVALUE "new text"
 #define TEST_SET_IVALUE 1000.0
@@ -58,13 +54,10 @@ static char *g_insert_audio_path = NULL;
 static char *g_insert_path_list[3];
 static char *g_burst_path_list[3];
 
-static time_t g_added_time;
-
 static media_content_error_e foreach_cb_result = MEDIA_CONTENT_ERROR_NONE;
 static media_content_error_e insert_batch_cb_result = MEDIA_CONTENT_ERROR_NONE;
 static media_content_error_e thumb_cb_result = MEDIA_CONTENT_ERROR_NONE;
 static media_content_error_e face_detection_cb_result = MEDIA_CONTENT_ERROR_NONE;
-static media_content_error_e insert_burst_cb_result = MEDIA_CONTENT_ERROR_NONE;
 static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE;
 static media_content_error_e g_cb_ret = MEDIA_CONTENT_ERROR_NONE;
 
index 4eb10de2a4032da95e651679dd5117912426a3cc..9ac0f62b18e940bf20f620956a1a047baa0a4614 100755 (executable)
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
-#include <stdlib.h>
-#include <string.h>
 #include <media_content.h>
+#include <tct_common.h>
 #include <storage.h>
 
 #define TEST_SET_PLAYLIST_SUB_1 "test_playlist_123"
index 3fc559c5b214abf3ac534af14a2f25e7fcb86312..193644a68c616854efa5a61e3d5d12c5127a08f3 100755 (executable)
@@ -13,8 +13,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
 #include <media_content.h>
+#include <tct_common.h>
 
 //& set: MediaAudio
 
index 45f9506be2476450eadc1169c88abb12e5905f0e..721e14bd0d9f69c9aa52632d5531de2f6fcf60db 100755 (executable)
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
 #include <media_content.h>
-#include <stdlib.h>
-#include <string.h>
+#include <tct_common.h>
 
 //& set: MediaTag
 
index 1cdf577ff5b19f588697fcf6d95c4de73ea14af2..937db82dd689539d808788ecfe78812d8ade36e0 100755 (executable)
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-#include "assert.h"
 #include <media_content.h>
-#include <stdlib.h>
-#include <string.h>
+#include <tct_common.h>
 
 //& set: MediaVideo