Fixed the build error using gcc 13 09/295009/1 accepted/tizen/8.0/unified/20231005.092702 accepted/tizen/unified/20230630.124102 accepted/tizen/unified/dev/20230726.115614 tizen_8.0_m2_release
authorwchang kim <wchang.kim@samsung.com>
Thu, 29 Jun 2023 21:42:31 +0000 (06:42 +0900)
committerwchang kim <wchang.kim@samsung.com>
Thu, 29 Jun 2023 21:42:31 +0000 (06:42 +0900)
Change-Id: Idee43eaeb630f807d4cb17bdbe3b7cd37e365623

src/image_util.c
src/image_util_encode.c

index 497d8eb..0ea1c4c 100644 (file)
@@ -233,7 +233,7 @@ int image_util_transform_set_colorspace(transformation_h handle, image_util_colo
        image_util_retvm_if(!_handle, IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid Handle");
        image_util_retvm_if(!_is_valid_colorspace(colorspace), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid colorspace");
 
-       _handle->color = colorspace;
+       _handle->color = (mm_util_color_format_e)colorspace;
        _handle->set_convert = true;
 
        return IMAGE_UTIL_ERROR_NONE;
@@ -264,7 +264,7 @@ int image_util_transform_set_rotation(transformation_h handle, image_util_rotati
 
        image_util_retvm_if(!_handle, IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid Handle");
 
-       _handle->rotation = rotation;
+       _handle->rotation = (mm_util_rotate_type_e)rotation;
        _handle->set_rotate = true;
 
        return IMAGE_UTIL_ERROR_NONE;
@@ -306,7 +306,7 @@ int image_util_transform_get_colorspace(transformation_h handle, image_util_colo
 
        image_util_debug("Get colorspace_convert_info [%d]", _handle->color);
 
-       *colorspace = _handle->color;
+       *colorspace = (image_util_colorspace_e)(_handle->color);
 
        return IMAGE_UTIL_ERROR_NONE;
 }
@@ -338,7 +338,7 @@ int image_util_transform_get_rotation(transformation_h handle, image_util_rotati
 
        image_util_debug("Get rotate_info [%d]", _handle->rotation);
 
-       *rotation = _handle->rotation;
+       *rotation = (image_util_rotation_e)(_handle->rotation);
 
        return IMAGE_UTIL_ERROR_NONE;
 }
@@ -460,7 +460,7 @@ int image_util_create_image(unsigned int width, unsigned int height, image_util_
 {
        int ret = IMAGE_UTIL_ERROR_NONE;
 
-       ret = mm_image_create_image(width, height, colorspace, data, data_size, image);
+       ret = mm_image_create_image(width, height, (mm_util_color_format_e)colorspace, data, data_size, image);
 
        return _image_error_capi(ret);
 }
index 5cb30fb..6dd6838 100644 (file)
@@ -84,7 +84,7 @@ static int __allocate_source_buffer(encode_s *handle)
        handle->gif_encode_info.sources = g_realloc(handle->gif_encode_info.sources, sizeof(mm_image_info_s *) * (handle->gif_encode_info.source_count + 1));
        handle->gif_encode_info.sources[handle->gif_encode_info.source_count] = g_new0(mm_image_info_s, 1);
 
-       handle->gif_encode_info.sources[handle->gif_encode_info.source_count]->color = IMAGE_UTIL_COLORSPACE_RGBA8888;
+       handle->gif_encode_info.sources[handle->gif_encode_info.source_count]->color = (mm_util_color_format_e)IMAGE_UTIL_COLORSPACE_RGBA8888;
        handle->gif_encode_info.source_count++;
 
        image_util_fleave();
@@ -142,7 +142,7 @@ int image_util_encode_create(image_util_type_e image_type, image_util_encode_h *
                return _image_error_capi(err);
        }
 
-       _handle->src.color = IMAGE_UTIL_COLORSPACE_RGBA8888;
+       _handle->src.color = (mm_util_color_format_e)IMAGE_UTIL_COLORSPACE_RGBA8888;
 
        _handle->thread = NULL;
        _handle->new_src = NULL;
@@ -425,7 +425,7 @@ static int __image_util_encode_run_to_file(image_util_encode_h handle, image_uti
        image_util_retvm_if(!_handle, IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid handle");
        image_util_retvm_if(!image, IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid image");
 
-       ret = _check_colorspace(_handle->image_type, ((mm_image_info_s *)image)->color);
+       ret = _check_colorspace(_handle->image_type, (image_util_colorspace_e)((mm_image_info_s *)image)->color);
        image_util_retvm_if(ret != IMAGE_UTIL_ERROR_NONE, ret, "Invalid colorspace");
 
        ret = _check_encode_path(file_path);
@@ -472,7 +472,7 @@ static int __image_util_encode_run_to_buffer(image_util_encode_h handle, image_u
        image_util_retvm_if(!_handle, IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid handle");
        image_util_retvm_if(!image, IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid image");
 
-       ret = _check_colorspace(_handle->image_type, ((mm_image_info_s *)image)->color);
+       ret = _check_colorspace(_handle->image_type, (image_util_colorspace_e)((mm_image_info_s *)image)->color);
        image_util_retvm_if(ret != IMAGE_UTIL_ERROR_NONE, ret, "Invalid colorspace");
 
        image_util_retvm_if(!buffer, IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid buffer");
@@ -644,7 +644,7 @@ int image_util_encode_run_async_to_file(image_util_encode_h handle, image_util_i
        image_util_retvm_if(!_handle, IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid handle");
        image_util_retvm_if(!image, IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid image");
 
-       ret = _check_colorspace(_handle->image_type, ((mm_image_info_s *)image)->color);
+       ret = _check_colorspace(_handle->image_type, (image_util_colorspace_e)((mm_image_info_s *)image)->color);
        image_util_retvm_if(ret != IMAGE_UTIL_ERROR_NONE, ret, "Invalid colorspace");
 
        ret = _check_encode_path(file_path);
@@ -684,7 +684,7 @@ int image_util_encode_run_async_to_buffer(image_util_encode_h handle, image_util
        image_util_retvm_if(!_handle, IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid handle");
        image_util_retvm_if(!image, IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid image");
 
-       ret = _check_colorspace(_handle->image_type, ((mm_image_info_s *)image)->color);
+       ret = _check_colorspace(_handle->image_type, (image_util_colorspace_e)((mm_image_info_s *)image)->color);
        image_util_retvm_if(ret != IMAGE_UTIL_ERROR_NONE, ret, "Invalid colorspace");
 
        image_util_retvm_if(!completed_cb, IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid completed_cb");