Add 'const' keyword to fix build warning of internal APIs. 46/145046/2
authorJiyong Min <jiyong.min@samsung.com>
Mon, 21 Aug 2017 03:31:50 +0000 (12:31 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Mon, 21 Aug 2017 05:43:15 +0000 (14:43 +0900)
Change-Id: I8e36198f03a0f46a1dd87e2247bf14723cb645c1
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
gif/include/mm_util_gif.h
gif/mm_util_gif.c
packaging/libmm-utility.spec

index cb313b6..45420b4 100755 (executable)
@@ -98,9 +98,9 @@ typedef struct {
        unsigned char blue;
 } mm_util_gif_color_s;
 
-typedef struct gif_image_s* mm_gif_image_h;
+typedef void* mm_gif_image_h;
 
-typedef struct gif_file_s* mm_gif_file_h;
+typedef void* mm_gif_file_h;
 #endif
 
 typedef struct {
@@ -220,7 +220,7 @@ int mm_util_gif_image_create(mm_gif_file_h gif_file_h, mm_gif_image_h *gif_image
  * @see                                        mm_util_gif_image_create
  * @pre                                        mm_util_gif_image_create
  */
-int mm_util_gif_image_set_position(mm_gif_image_h gif_image_h, int left, int top, int width, int height);
+int mm_util_gif_image_set_position(mm_gif_image_h gif_image_h, const int left, const int top, const int width, const int height);
 
 /**
  * This function sets the disposal mode(graphic control) of the single image(frame).
@@ -260,7 +260,7 @@ int mm_util_gif_image_set_delay_time(mm_gif_image_h gif_image_h, const int delay
  * @see                                        mm_util_gif_image_create
  * @pre                                        mm_util_gif_image_create
  */
-int mm_util_gif_image_set_image(mm_gif_image_h gif_image_h, unsigned char *image_data, unsigned long size);
+int mm_util_gif_image_set_image(mm_gif_image_h gif_image_h, const unsigned char *image_data, const unsigned long size);
 
 /**
  * This function destroys the handle of the single image(frame).
@@ -341,7 +341,7 @@ int mm_util_gif_encode_set_resolution(mm_gif_file_h gif_file_h, const int width,
  * @see                                        mm_util_gif_encode_create
  * @pre                                        mm_util_gif_encode_create
  */
-int mm_util_gif_encode_set_repeat(mm_gif_file_h gif_file_h, gboolean repeat_mode, unsigned short repeat_count);
+int mm_util_gif_encode_set_repeat(mm_gif_file_h gif_file_h, gboolean repeat_mode, const unsigned short repeat_count);
 
 /**
  * This function starts encoding image.
@@ -407,7 +407,7 @@ int mm_util_gif_enocde_set_image_handle(mm_gif_file_h gif_file_h, mm_gif_image_h
  * @see                                        mm_util_gif_encode_create
  * @pre                                        mm_util_gif_encode_add_image
  */
-int mm_util_gif_enocde_get_image_handle(mm_gif_file_h gif_file_h, int index, mm_gif_image_h *gif_image_h);
+int mm_util_gif_enocde_get_image_handle(mm_gif_file_h gif_file_h, const int index, mm_gif_image_h *gif_image_h);
 
 /**
  * This function encodes gif image with images set into gif handle.
index 314c81c..7a136f2 100755 (executable)
@@ -1004,7 +1004,7 @@ int mm_util_gif_image_create(mm_gif_file_h gif_file_h, mm_gif_image_h *gif_image
        return MM_UTIL_ERROR_NONE;
 }
 
-int mm_util_gif_image_set_position(mm_gif_image_h gif_image_h, int left, int top, int width, int height)
+int mm_util_gif_image_set_position(mm_gif_image_h gif_image_h, const int left, const int top, const int width, const int height)
 {
        gif_image_s *gif_image = (gif_image_s *)gif_image_h;
 
@@ -1065,7 +1065,7 @@ int mm_util_gif_image_set_tp_color(mm_gif_image_h gif_image_h, const mm_util_gif
        return MM_UTIL_ERROR_NONE;
 }
 
-int mm_util_gif_image_set_color_map(mm_gif_image_h gif_image_h, int number_of_colors, mm_util_gif_color_s *colors)
+int mm_util_gif_image_set_color_map(mm_gif_image_h gif_image_h, const int number_of_colors, mm_util_gif_color_s *colors)
 {
        gif_image_s *gif_image = (gif_image_s *)gif_image_h;
 
@@ -1084,7 +1084,7 @@ int mm_util_gif_image_set_color_map(mm_gif_image_h gif_image_h, int number_of_co
        return MM_UTIL_ERROR_NONE;
 }
 
-int mm_util_gif_image_set_image(mm_gif_image_h gif_image_h, unsigned char *image_data, unsigned long size)
+int mm_util_gif_image_set_image(mm_gif_image_h gif_image_h, const unsigned char *image_data, const unsigned long size)
 {
        gif_image_s *gif_image = (gif_image_s *)gif_image_h;
 
@@ -1094,7 +1094,7 @@ int mm_util_gif_image_set_image(mm_gif_image_h gif_image_h, unsigned char *image
 
        mm_util_info("%s ptr = %p, size = %lu", __func__, image_data, size);
 
-       gif_image->image_data = image_data;
+       gif_image->image_data = (void *)image_data;
        gif_image->image_data_size = size;
 
        return MM_UTIL_ERROR_NONE;
@@ -1219,7 +1219,7 @@ int mm_util_gif_encode_set_bg_color(mm_gif_file_h gif_file_h, const mm_util_gif_
 }
 #endif
 
-int mm_util_gif_encode_set_repeat(mm_gif_file_h gif_file_h, gboolean repeat_mode, unsigned short repeat_count)
+int mm_util_gif_encode_set_repeat(mm_gif_file_h gif_file_h, gboolean repeat_mode, const unsigned short repeat_count)
 {
        gif_file_s *gif_file = (gif_file_s *)gif_file_h;
 
@@ -1375,7 +1375,7 @@ int mm_util_gif_enocde_set_image_handle(mm_gif_file_h gif_file_h, mm_gif_image_h
        return MM_UTIL_ERROR_NONE;
 }
 
-int mm_util_gif_enocde_get_image_handle(mm_gif_file_h gif_file_h, int index, mm_gif_image_h *gif_image_h)
+int mm_util_gif_enocde_get_image_handle(mm_gif_file_h gif_file_h, const int index, mm_gif_image_h *gif_image_h)
 {
        gif_file_s *gif_file = (gif_file_s *)gif_file_h;
 
index d37cd74..8d8998f 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       libmm-utility
 Summary:    Multimedia Framework Utility Library
-Version:    0.36
+Version:    0.37
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0