]> granicus.if.org Git - libjpeg-turbo/commitdiff
Fix Visual C++ compiler warnings
authorDRC <information@libjpeg-turbo.org>
Thu, 4 Feb 2016 16:58:10 +0000 (10:58 -0600)
committerDRC <information@libjpeg-turbo.org>
Thu, 4 Feb 2016 16:58:10 +0000 (10:58 -0600)
jcdctmgr.c
rdppm.c

index 4cac666483985063e7c28439616758a911183f5f..6a8e8311daa5956f3b8d55337108750a558d2d18 100644 (file)
@@ -184,7 +184,7 @@ compute_reciprocal (UINT16 divisor, DCTELEM * dtbl)
     dtbl[DCTSIZE2 * 0] = (DCTELEM) 1;                       /* reciprocal */
     dtbl[DCTSIZE2 * 1] = (DCTELEM) 0;                       /* correction */
     dtbl[DCTSIZE2 * 2] = (DCTELEM) 1;                       /* scale */
-    dtbl[DCTSIZE2 * 3] = (DCTELEM) (-sizeof(DCTELEM) * 8);  /* shift */
+    dtbl[DCTSIZE2 * 3] = -(DCTELEM) (sizeof(DCTELEM) * 8);  /* shift */
     return 0;
   }
 
diff --git a/rdppm.c b/rdppm.c
index c4aed8e8a6518f848d5266ba89783dba66daee37..ebe82acc069c82b57f5da95bd9f6029885d4f28e 100644 (file)
--- a/rdppm.c
+++ b/rdppm.c
@@ -92,7 +92,7 @@ pbm_getc (FILE * infile)
 
 
 LOCAL(unsigned int)
-read_pbm_integer (j_compress_ptr cinfo, FILE * infile, int maxval)
+read_pbm_integer (j_compress_ptr cinfo, FILE * infile, unsigned int maxval)
 /* Read an unsigned decimal integer from the PPM file */
 /* Swallows one trailing character after the integer */
 /* Note that on a 16-bit-int machine, only values up to 64k can be read. */
@@ -144,7 +144,7 @@ get_text_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
   register JSAMPROW ptr;
   register JSAMPLE *rescale = source->rescale;
   JDIMENSION col;
-  int maxval = source->maxval;
+  unsigned int maxval = source->maxval;
 
   ptr = source->pub.buffer[0];
   for (col = cinfo->image_width; col > 0; col--) {
@@ -163,7 +163,7 @@ get_text_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
   register JSAMPROW ptr;
   register JSAMPLE *rescale = source->rescale;
   JDIMENSION col;
-  int maxval = source->maxval;
+  unsigned int maxval = source->maxval;
 
   ptr = source->pub.buffer[0];
   for (col = cinfo->image_width; col > 0; col--) {