X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2Fgdcmjpegls%2FDecoder%2Fbitio.c;h=6309f20af79132b4d579cd873e7f6d5ada725595;hb=798e228cc684bc3378792c0ab60a8445e5fe80d1;hp=8353b108b671fccb6323baff5bb1c99ea181d6e5;hpb=8a8b4ae83ad19690f0cc51ebc9091d75ffc1cd8d;p=gdcm.git diff --git a/src/gdcmjpegls/Decoder/bitio.c b/src/gdcmjpegls/Decoder/bitio.c index 8353b108..6309f20a 100644 --- a/src/gdcmjpegls/Decoder/bitio.c +++ b/src/gdcmjpegls/Decoder/bitio.c @@ -51,6 +51,7 @@ #include "global.h" #include "bitio.h" +#include /* for memset */ extern int zeroLUT[]; /* lookup table to find number of leading zeroes */ @@ -88,6 +89,7 @@ int bits; /* number of bits free in bit buffer (on output) */ void bufiinit(FILE *fil) { /* argument is ignored */ + (void)fil; fp = BUFSIZE; truebufsize = 0; foundeof = 0; @@ -141,7 +143,8 @@ void bitiflush() { int filled, discard, dbytes, - i, k, treg; + i, k; + unsigned int treg; byte *bp; filled = 24 - bits; /* how many bits at the MS part of reg @@ -179,16 +182,16 @@ void bitiflush() { } /* check consistency */ if ( filled-k > 7 ) { - fprintf(stderr,"bitiflush: inconsistent bits=%d filled=%d k=%d\n",bits,filled,k); - exit(10); + fprintf(stderr,"bitiflush: inconsistent bits=%d filled=%d k=%d\n",bits,filled,k); + exit(10); } discard = filled-k; if ( treg != (reg<