]> Creatis software - gdcm.git/commitdiff
FIX: Some warnings
authormalaterre <malaterre>
Sun, 12 Sep 2004 02:08:10 +0000 (02:08 +0000)
committermalaterre <malaterre>
Sun, 12 Sep 2004 02:08:10 +0000 (02:08 +0000)
src/jpeg/ljpg/huffd.c

index 92e34562626dc8a21dcbf5e3641d9aa14647648d..89803a0f022092f47ad72a74766afbeea6bf3b6a 100644 (file)
@@ -5,7 +5,7 @@
  * software
  */
 /*
- * $Id: huffd.c,v 1.3 2004/08/18 02:26:08 malaterre Exp $
+ * $Id: huffd.c,v 1.4 2004/09/12 02:08:10 malaterre Exp $
  */
 #include <stdio.h>
 #include <stdlib.h>
 #include "proto.h"
 #include "predict.h"
 
-
 #define RST0    0xD0                /* RST0 marker code */
 
 static long getBuffer;              /* current bit-extraction buffer */
-static int  bitsLeft;               /* # of unused bits in it */
+static unsigned int  bitsLeft;               /* # of unused bits in it */
 
 /*
  * The following variables keep track of the input buffer
@@ -111,7 +110,7 @@ static int bmask[] = {0x0000,
 }
 
 #define get_bits(nbits,rv) {                                            \
-        if (bitsLeft < nbits) FillBitBuffer(nbits);                     \
+        if (bitsLeft < (unsigned)nbits) FillBitBuffer(nbits);                     \
         rv = ((getBuffer >> (bitsLeft -= (nbits)))) & bmask[nbits];     \
 }