if (numlayers > 9)
s++;
- parameters->tcp_numlayers = numlayers;
- numresolution = parameters->numresolution;
+ parameters->tcp_numlayers = (int)numlayers;
+ numresolution = (OPJ_UINT32)parameters->numresolution;
matrix_width = numresolution * 3;
parameters->cp_matrice = (int *) malloc(numlayers * matrix_width * sizeof(int));
s = s + 2;
}
s++;
}
- parameters->numpocs = numpocs;
+ parameters->numpocs = (OPJ_UINT32)numpocs;
}
break;
float *lCurrentDoublePtr;
float *lSpace;
int *l_int_ptr;
- int lNbComp = 0, lTotalComp, lMctComp, i; long int lStrLen, lStrFread;
+ int lNbComp = 0, lTotalComp, lMctComp, i;
+ size_t lStrLen, lStrFread;
/* Open file */
FILE * lFile = fopen(lFilename,"r");
/* Set size of file and read its content*/
fseek(lFile,0,SEEK_END);
- lStrLen = ftell(lFile);
+ lStrLen = (size_t)ftell(lFile);
fseek(lFile,0,SEEK_SET);
lMatrix = (char *) malloc(lStrLen + 1);
lStrFread = fread(lMatrix, 1, lStrLen, lFile);
lNbComp = (int) (sqrt(4*lNbComp + 1)/2. - 0.5);
lMctComp = lNbComp * lNbComp;
lTotalComp = lMctComp + lNbComp;
- lSpace = (float *) malloc(lTotalComp * sizeof(float));
+ lSpace = (float *) malloc((size_t)lTotalComp * sizeof(float));
lCurrentDoublePtr = lSpace;
for (i=0;i<lMctComp;++i) {
lStrLen = strlen(lCurrentPtr) + 1;
}
/* TODO should not be here ! */
- opj_set_MCT(parameters, lSpace, (int *)(lSpace + lMctComp), lNbComp);
+ opj_set_MCT(parameters, lSpace, (int *)(lSpace + lMctComp), (OPJ_UINT32)lNbComp);
/* Free memory*/
free(lSpace);
fprintf(stderr,"\n");
if(img_fol.set_imgdir==1){
- if (get_next_file(imageno, dirptr,&img_fol, ¶meters)) {
+ if (get_next_file((int)imageno, dirptr,&img_fol, ¶meters)) {
fprintf(stderr,"skipping file...\n");
continue;
}