Modify invalid conversion type and argument mismatch 49/89749/1 accepted/tizen/3.0/common/20161114.105755 accepted/tizen/3.0/ivi/20161011.043810 accepted/tizen/3.0/mobile/20161015.032644 accepted/tizen/3.0/tv/20161016.003952 accepted/tizen/3.0/wearable/20161015.081855 accepted/tizen/common/20160928.163935 accepted/tizen/ivi/20160930.040745 accepted/tizen/mobile/20160930.040419 accepted/tizen/tv/20160930.040556 accepted/tizen/wearable/20160930.040655 submit/tizen/20160928.043825 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000001 submit/tizen_3.0_mobile/20161015.000001 submit/tizen_3.0_tv/20161015.000001 submit/tizen_3.0_wearable/20161015.000001
authorJiyong Min <jiyong.min@samsung.com>
Mon, 26 Sep 2016 23:57:53 +0000 (08:57 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Tue, 27 Sep 2016 00:01:46 +0000 (09:01 +0900)
 - PROBLEM
 build warning

Change-Id: Ibc5da37d908d59d8cdcaca928af0e41a834d075f
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
libdcm-util/dcm_image_codec.cpp

index 54c553d70cc6d72e78bc57b93646683b5119edff..034beedd9e37be053dbba49a695dfe04328ba812 100755 (executable)
@@ -145,13 +145,14 @@ static int _dcm_rotate_image(const unsigned char *source, const dcm_image_format
        return DCM_SUCCESS;
 }
 
-int _dcm_rotate_rgb(unsigned char *source, const unsigned int size, int format, unsigned int *ori_width, unsigned int *ori_height)
+int _dcm_rotate_rgb(unsigned char *source, const unsigned long long *size, int format, unsigned int *ori_width, unsigned int *ori_height)
 {
        unsigned int dpp = 0; /* data per pixel */
        unsigned int x = 0, y = 0;
        unsigned int i = 0;
        unsigned int width = 0, height = 0;
        unsigned char *temp_buf = NULL;
+       size_t _size = (size_t)*size;
 
        if (format == DCM_IMAGE_FORMAT_RGBA) {
                dpp = 4;
@@ -162,13 +163,13 @@ int _dcm_rotate_rgb(unsigned char *source, const unsigned int size, int format,
                return DCM_ERROR_INVALID_PARAMETER;
        }
 
-       temp_buf = malloc(size);
+       temp_buf = (unsigned char*)malloc(_size);
        if (temp_buf == NULL) {
                dcm_error("Failed to allocate memory");
                return DCM_ERROR_OUT_OF_MEMORY;
        }
        /* initialize */
-       memset(temp_buf, 0x00, size);
+       memset(temp_buf, 0x00, _size);
        width = *ori_width;
        height = *ori_height;
 
@@ -183,7 +184,7 @@ int _dcm_rotate_rgb(unsigned char *source, const unsigned int size, int format,
        }
 
        /* copy image from temp buffer to original buffer */
-       memcpy(source, temp_buf, size);
+       memcpy(source, temp_buf, _size);
        DCM_SAFE_FREE(temp_buf);
 
        /* swap width & height due to rotate 90 degree */