summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorAntonin Descampe <antonin@gmail.com>2014-03-26 15:17:17 +0000
committerAntonin Descampe <antonin@gmail.com>2014-03-26 15:17:17 +0000
commita54d757a3ea5f7d5ce9efae355b67a8ec339e7bf (patch)
treec1bb8a8b47fad6950f088f8a4f5d7138ac349143 /src/bin
parentb5eb374fb95b072ea12f02b137bc6ea81f933046 (diff)
[trunk] fixed warnings triggered on linux related to r2802
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/jp2/convert.c4
-rw-r--r--src/bin/jp2/opj_compress.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/bin/jp2/convert.c b/src/bin/jp2/convert.c
index 0033b523..a59c3c76 100644
--- a/src/bin/jp2/convert.c
+++ b/src/bin/jp2/convert.c
@@ -2989,8 +2989,8 @@ static opj_image_t* rawtoimage_common(const char *filename, opj_cparameters_t *p
cmptparm[i].prec = (OPJ_UINT32)raw_cp->rawBitDepth;
cmptparm[i].bpp = (OPJ_UINT32)raw_cp->rawBitDepth;
cmptparm[i].sgnd = (OPJ_UINT32)raw_cp->rawSigned;
- cmptparm[i].dx = (OPJ_UINT32)subsampling_dx * raw_cp->rawComps[i].dx;
- cmptparm[i].dy = (OPJ_UINT32)subsampling_dy * raw_cp->rawComps[i].dy;
+ cmptparm[i].dx = (OPJ_UINT32)(subsampling_dx * raw_cp->rawComps[i].dx);
+ cmptparm[i].dy = (OPJ_UINT32)(subsampling_dy * raw_cp->rawComps[i].dy);
cmptparm[i].w = (OPJ_UINT32)w;
cmptparm[i].h = (OPJ_UINT32)h;
}
diff --git a/src/bin/jp2/opj_compress.c b/src/bin/jp2/opj_compress.c
index 8bd8b4d3..5957a467 100644
--- a/src/bin/jp2/opj_compress.c
+++ b/src/bin/jp2/opj_compress.c
@@ -575,13 +575,13 @@ static int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *param
char *sep;
char signo;
int width,height,bitdepth,ncomp;
- int len;
+ OPJ_UINT32 len;
OPJ_BOOL raw_signed;
substr2 = strchr(opj_optarg,'@');
if (substr2 == NULL) {
- len = (int) strlen(opj_optarg);
+ len = (OPJ_UINT32) strlen(opj_optarg);
} else {
- len = substr2 - opj_optarg;
+ len = (OPJ_UINT32) (substr2 - opj_optarg);
substr2++; /* skip '@' character */
}
substr1 = (char*) malloc((len+1)*sizeof(char));
@@ -607,7 +607,7 @@ static int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *param
raw_cp->rawComp = ncomp;
raw_cp->rawBitDepth = bitdepth;
raw_cp->rawSigned = raw_signed;
- raw_cp->rawComps = (raw_comp_cparameters_t*) malloc(ncomp*sizeof(raw_comp_cparameters_t));
+ raw_cp->rawComps = (raw_comp_cparameters_t*) malloc(((OPJ_UINT32)(ncomp))*sizeof(raw_comp_cparameters_t));
for (i = 0; i < ncomp && !wrong; i++) {
if (substr2 == NULL) {
raw_cp->rawComps[i].dx = lastdx;