]> granicus.if.org Git - openjpeg/commitdiff
[trunk] removed some warnings when building src/bin/jp2/convert.c
authorMatthieu Darbois <mayeut@users.noreply.github.com>
Tue, 25 Nov 2014 20:06:12 +0000 (20:06 +0000)
committerMatthieu Darbois <mayeut@users.noreply.github.com>
Tue, 25 Nov 2014 20:06:12 +0000 (20:06 +0000)
Update  issue 442

src/bin/jp2/convert.c

index 47d8b0be7d01f14df910c39db21639a99b13d959..7d317aeea2265fa7161f8a66cab83b9606fc669f 100644 (file)
@@ -112,9 +112,9 @@ void scale_component(opj_image_comp_t* component, OPJ_UINT32 precision)
                return;
        }
        if (component->prec < precision) {
-               shift = precision - component->prec;
+               shift = (int)(precision - component->prec);
        } else {
-               shift = component->prec - precision;
+               shift = (int)(component->prec - precision);
        }
        len = (OPJ_SIZE_T)component->w * (OPJ_SIZE_T)component->h;
        
@@ -3078,7 +3078,7 @@ static opj_image_t* rawtoimage_common(const char *filename, opj_cparameters_t *p
     }
     w = raw_cp->rawWidth;
     h = raw_cp->rawHeight;
-    cmptparm = (opj_image_cmptparm_t*) calloc(numcomps,sizeof(opj_image_cmptparm_t));
+    cmptparm = (opj_image_cmptparm_t*) calloc((OPJ_UINT32)numcomps,sizeof(opj_image_cmptparm_t));
     if (!cmptparm) {
         fprintf(stderr, "Failed to allocate image components parameters !!\n");
         fprintf(stderr,"Aborting\n");