]> Creatis software - gdcm.git/blobdiff - src/gdcmjpegls/Decoder/decoder.c
ENH: Need to allow hex for expressing size
[gdcm.git] / src / gdcmjpegls / Decoder / decoder.c
index afdf4799d871ed12efc22c70d66be83d538f899f..4f7bbb5ef4f2dfa119f2f24107b99931e7d8e32f 100644 (file)
@@ -138,7 +138,7 @@ inline void write_one_line(pixel* line, int cols, FILE* outfile)
       line8 = (unsigned char*)safealloc(cols);
   
       for (i=0; i< cols; i++)
-        *(line8+i)=ENDIAN8(*(line+i));
+        *(line8+i)=(unsigned char)ENDIAN8(*(line+i));
     
       fwrite(line8, sizeof(unsigned char), cols, outfile);
 
@@ -316,7 +316,7 @@ int initialize(int argc, char *argv[])
   int pos;   /* position in the file, after the header */
 
   for (i=0;i<MAX_COMPONENTS;i++) {
-    c_outfilename[i]=malloc(strlen(OUTFILE)+20);
+    c_outfilename[i]=(char*)malloc(strlen(OUTFILE)+20);
     sprintf(c_outfilename[i],"%s%d.out",OUTFILE,i+1);
   }