Fix typo 'readed' and remove unused header 99/274299/2 accepted/tizen/unified/20220428.162639 submit/tizen/20220427.231424
authorjiyong.min <jiyong.min@samsung.com>
Tue, 26 Apr 2022 04:41:02 +0000 (13:41 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Tue, 26 Apr 2022 04:47:49 +0000 (13:47 +0900)
Change-Id: I5b023c27f4bcd030478cef661f18b1652b96e495

anim/test/mm_util_anim_testsuite.c
gif/test/mm_util_gif_testsuite.c
heif/test/mm_util_heif_testsuite.c
jpeg/test/mm_util_jpeg_testsuite.c
jxl/test/mm_util_jxl_testsuite.c
webp/test/mm_util_webp_testsuite.c

index 66146de..370b3fd 100644 (file)
@@ -19,7 +19,6 @@
 #include <string.h>
 #include <errno.h>
 #include <glib.h>
-#include <limits.h>
 
 #include <mm_util_anim.h>
 #include <mm_util_image.h>
index 6905e85..7084e13 100644 (file)
@@ -64,8 +64,8 @@ static unsigned int g_width = 0;
 static unsigned int g_height = 0;
 
 /* for reading file */
-static void *g_readed_data = NULL;
-static size_t g_readed_size = 0;
+static void *g_read_data = NULL;
+static size_t g_read_size = 0;
 
 static mm_util_image_h g_decoded_data = NULL;
 
@@ -156,13 +156,13 @@ gboolean _test_decode(const test_mode_e mode)
                }
                SAFE_FREE(data);
        } else if (mode == TEST_DECODE_MEMORY) {
-               ret = mm_util_file_read(g_path, &g_readed_data, &g_readed_size);
+               ret = mm_util_file_read(g_path, &g_read_data, &g_read_size);
                if (ret != MM_UTIL_ERROR_NONE) {
                        fprintf(stderr, "\t[GIF_testsuite] mm_util_file_read failed %d\n", ret);
                        return FALSE;
                }
 
-               ret = mm_util_decode_from_gif_memory(g_readed_data, g_readed_size, &g_decoded_data);
+               ret = mm_util_decode_from_gif_memory(g_read_data, g_read_size, &g_decoded_data);
                if (ret != MM_UTIL_ERROR_NONE) {
                        fprintf(stderr, "\t[GIF_testsuite] mm_util_decode_from_gif_memory failed %d\n", ret);
                        return FALSE;
@@ -194,13 +194,13 @@ gboolean _test_encode(const test_mode_e mode)
        if ((mode != TEST_ENCODE_FILE) && (mode != TEST_ENCODE_MEMORY))
                return TRUE;
 
-       ret = mm_util_file_read(g_path, &g_readed_data, &g_readed_size);
+       ret = mm_util_file_read(g_path, &g_read_data, &g_read_size);
        if (ret != MM_UTIL_ERROR_NONE) {
                fprintf(stderr, "\t[GIF_testsuite] mm_util_file_read failed %d\n", ret);
                return FALSE;
        }
 
-       ret = mm_image_create_image(g_width, g_height, MM_UTIL_COLOR_RGBA, (unsigned char *)g_readed_data, g_readed_size, &g_decoded_data);
+       ret = mm_image_create_image(g_width, g_height, MM_UTIL_COLOR_RGBA, (unsigned char *)g_read_data, g_read_size, &g_decoded_data);
        if (ret != MM_UTIL_ERROR_NONE) {
                fprintf(stderr, "\t[GIF_testsuite] mm_image_create_image failed : %d\n", ret);
                return FALSE;
@@ -261,8 +261,8 @@ gboolean _test_auto()
 
                fprintf(stderr, "\t[GIF_testsuite] >>>>>>>>>>>>>>>>>>>>>> \'%s\' TEST SUCCESS\n", MODE_TO_STR[test_mode]);
 
-               g_free(g_readed_data);
-               g_readed_data = NULL;
+               g_free(g_read_data);
+               g_read_data = NULL;
                SAFE_IMAGE_FREE(g_decoded_data);
                test_mode++;
        }
@@ -307,7 +307,7 @@ int main(int argc, char *argv[])
 
 out:
        g_free(g_path);
-       g_free(g_readed_data);
+       g_free(g_read_data);
        SAFE_IMAGE_FREE(g_decoded_data);
 
        return 0;
index e4c7680..ba2db2d 100644 (file)
@@ -47,8 +47,8 @@ static char *g_path = NULL;
 static int g_color = MM_UTIL_COLOR_RGB24;
 
 /* for reading file */
-static void *g_readed_data = NULL;
-static gsize g_readed_size = 0;
+static void *g_read_data = NULL;
+static gsize g_read_size = 0;
 
 /* for saving result */
 static const char *g_test_filename[TEST_NUM][MM_UTIL_COLOR_NUM] = {
@@ -166,13 +166,13 @@ static gboolean __test_decode(const heif_test_mode_e mode, mm_util_color_format_
                        return FALSE;
                }
        } else if (mode == TEST_DECODE_BUFFER) {
-               ret = mm_util_file_read(g_path, &g_readed_data, &g_readed_size);
+               ret = mm_util_file_read(g_path, &g_read_data, &g_read_size);
                if (ret != MM_UTIL_ERROR_NONE) {
                        g_print("\t[HEIF_testsuite] mm_util_file_read failed %d\n", ret);
                        return FALSE;
                }
 
-               ret = mm_util_decode_heif_from_buffer(g_readed_data, g_readed_size, color, &g_decoded_data);
+               ret = mm_util_decode_heif_from_buffer(g_read_data, g_read_size, color, &g_decoded_data);
                if (ret != MM_UTIL_ERROR_NONE) {
                        g_print("\t[HEIF_testsuite] mm_util_decode_heif_from_buffer failed %d\n", ret);
                        return FALSE;
@@ -200,7 +200,7 @@ static gboolean __test_auto()
                if ((test_mode == TEST_DECODE_FILE) || (test_mode == TEST_DECODE_BUFFER)) {
                        for (color = MM_UTIL_COLOR_YUV420; color < MM_UTIL_COLOR_NUM; color++) {
                                result |= __test_decode(test_mode, color, g_test_filename[test_mode][color]);
-                               SAFE_FREE(g_readed_data);
+                               SAFE_FREE(g_read_data);
                                SAFE_IMAGE_FREE(g_decoded_data);
                        }
                }
@@ -240,7 +240,7 @@ int main(int argc, char *argv[])
 
 out:
        g_free(g_path);
-       SAFE_FREE(g_readed_data);
+       SAFE_FREE(g_read_data);
        SAFE_IMAGE_FREE(g_decoded_data);
 
        return 0;
index 0e5a902..1cb4c08 100644 (file)
@@ -66,8 +66,8 @@ static int g_quality = 75;
 static int g_downscale = MM_UTIL_JPEG_DECODE_DOWNSCALE_1_1;
 
 /* for reading file */
-static void *g_readed_data = NULL;
-static size_t g_readed_size = 0;
+static void *g_read_data = NULL;
+static size_t g_read_size = 0;
 
 static mm_util_image_h g_decoded_data = NULL;
 
@@ -180,13 +180,13 @@ gboolean _test_decode(const jpeg_test_mode_e mode)
                }
                SAFE_FREE(data);
        } else if (mode == TEST_DECODE_MEMORY) {
-               ret = mm_util_file_read(g_path, &g_readed_data, &g_readed_size);
+               ret = mm_util_file_read(g_path, &g_read_data, &g_read_size);
                if (ret != MM_UTIL_ERROR_NONE) {
                        fprintf(stderr, "\t[JPEG_testsuite] mm_util_file_read failed %d\n", ret);
                        return FALSE;
                }
 
-               ret = mm_util_decode_from_jpeg_memory(g_readed_data, g_readed_size, g_color, g_downscale, &g_decoded_data);
+               ret = mm_util_decode_from_jpeg_memory(g_read_data, g_read_size, g_color, g_downscale, &g_decoded_data);
                if (ret != MM_UTIL_ERROR_NONE) {
                        fprintf(stderr, "\t[JPEG_testsuite] mm_util_decode_from_jpeg_memory failed %d\n", ret);
                        return FALSE;
@@ -218,13 +218,13 @@ gboolean _test_encode(const jpeg_test_mode_e mode)
        if ((mode != TEST_ENCODE_FILE) && (mode != TEST_ENCODE_MEMORY))
                return TRUE;
 
-       ret = mm_util_file_read(g_path, &g_readed_data, &g_readed_size);
+       ret = mm_util_file_read(g_path, &g_read_data, &g_read_size);
        if (ret != MM_UTIL_ERROR_NONE) {
                fprintf(stderr, "\t[JPEG_testsuite] mm_util_file_read failed %d\n", ret);
                return FALSE;
        }
-       ret = mm_image_create_image(g_width, g_height, g_color, (unsigned char *)g_readed_data,
-                       g_readed_size, &g_decoded_data);
+       ret = mm_image_create_image(g_width, g_height, g_color, (unsigned char *)g_read_data,
+                       g_read_size, &g_decoded_data);
        if (ret != MM_UTIL_ERROR_NONE) {
                fprintf(stderr, "\t[JPEG_testsuite] mm_image_create_image failed : %d\n", ret);
                return FALSE;
@@ -284,7 +284,7 @@ gboolean _test_auto()
 
                fprintf(stderr, "\t[JPEG_testsuite] >>>>>>>>>>>>>>>>>>>>>> \'%s\' TEST SUCCESS\n", MODE_TO_STR[test_mode]);
 
-               SAFE_FREE(g_readed_data);
+               SAFE_FREE(g_read_data);
                SAFE_IMAGE_FREE(g_decoded_data);
                test_mode++;
        }
@@ -329,7 +329,7 @@ int main(int argc, char *argv[])
 
 out:
        g_free(g_path);
-       SAFE_FREE(g_readed_data);
+       SAFE_FREE(g_read_data);
        SAFE_IMAGE_FREE(g_decoded_data);
 
        return 0;
index 00d4bd7..97b4c3d 100644 (file)
@@ -54,8 +54,8 @@ static int g_color = MM_UTIL_COLOR_RGB24;
 static bool g_lossless = false;
 
 /* for reading file */
-static void *g_readed_data = NULL;
-static gsize g_readed_size = 0;
+static void *g_read_data = NULL;
+static gsize g_read_size = 0;
 
 /* for saving result */
 static const char *g_test_filename[TEST_NUM][MM_UTIL_COLOR_NUM] = {
@@ -171,13 +171,13 @@ static gboolean __get_decoded_data(void)
 {
        int ret = 0;
 
-       ret = mm_util_file_read(g_path, &g_readed_data, &g_readed_size);
+       ret = mm_util_file_read(g_path, &g_read_data, &g_read_size);
        if (ret != MM_UTIL_ERROR_NONE) {
                g_print("\t[JXL_testsuite] mm_util_file_read failed : %d\n", ret);
                return FALSE;
        }
        ret = mm_image_create_image(g_width, g_height, g_color,
-                               (const unsigned char*)g_readed_data, g_readed_size, &g_decoded_data);
+                               (const unsigned char*)g_read_data, g_read_size, &g_decoded_data);
        if (ret != MM_UTIL_ERROR_NONE) {
                g_print("\t[JXL_testsuite] mm_image_create_image failed : %d\n", ret);
                return FALSE;
@@ -216,7 +216,7 @@ static gboolean __test_decode(const jxl_test_mode_e mode, mm_util_color_format_e
 {
        int ret = 0;
 
-       SAFE_FREE(g_readed_data);
+       SAFE_FREE(g_read_data);
        SAFE_IMAGE_FREE(g_decoded_data);
 
        if ((mode != TEST_DECODE_FILE) && (mode != TEST_DECODE_BUFFER))
@@ -230,13 +230,13 @@ static gboolean __test_decode(const jxl_test_mode_e mode, mm_util_color_format_e
                        return FALSE;
                }
        } else if (mode == TEST_DECODE_BUFFER) {
-               ret = mm_util_file_read(g_path, &g_readed_data, &g_readed_size);
+               ret = mm_util_file_read(g_path, &g_read_data, &g_read_size);
                if (ret != MM_UTIL_ERROR_NONE) {
                        g_print("\t[JXL_testsuite] mm_util_file_read failed : %d\n", ret);
                        return FALSE;
                }
 
-               ret = mm_util_decode_jxl_from_buffer(g_readed_data, g_readed_size, color, &g_decoded_data);
+               ret = mm_util_decode_jxl_from_buffer(g_read_data, g_read_size, color, &g_decoded_data);
                if (ret != MM_UTIL_ERROR_NONE) {
                        g_print("\t[JXL_testsuite] mm_util_decode_jxl_from_buffer failed %d\n", ret);
                        return FALSE;
@@ -358,7 +358,7 @@ int main(int argc, char *argv[])
 
 out:
        g_free(g_path);
-       SAFE_FREE(g_readed_data);
+       SAFE_FREE(g_read_data);
        SAFE_IMAGE_FREE(g_decoded_data);
        mm_util_enc_opt_destroy(g_enc_opt);
 
index 0278980..06cb84f 100644 (file)
@@ -19,7 +19,6 @@
 #include <string.h>
 #include <errno.h>
 #include <glib.h>
-#include <limits.h>
 
 #include <mm_util_image.h>
 #include <mm_util_magick.h>