[trunk] fixed warnings triggered on linux related to r2802

This commit is contained in:
Antonin Descampe 2014-03-26 15:17:17 +00:00
parent b5eb374fb9
commit a54d757a3e
2 changed files with 6 additions and 6 deletions

View File

@ -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;
}

View File

@ -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;