X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2Fgdcmjpegls%2FDecoder%2Fbitio.c;h=7283e5a5378d2f1e9278b85f7696e6059cdb5dff;hb=57ec56658548c34052a1c1678ffcb6907c3faeec;hp=8353b108b671fccb6323baff5bb1c99ea181d6e5;hpb=8a8b4ae83ad19690f0cc51ebc9091d75ffc1cd8d;p=gdcm.git diff --git a/src/gdcmjpegls/Decoder/bitio.c b/src/gdcmjpegls/Decoder/bitio.c index 8353b108..7283e5a5 100644 --- a/src/gdcmjpegls/Decoder/bitio.c +++ b/src/gdcmjpegls/Decoder/bitio.c @@ -51,11 +51,12 @@ #include "global.h" #include "bitio.h" +#include /* for memset */ -extern int zeroLUT[]; /* lookup table to find number of leading zeroes */ +/*extern int zeroLUT[]; */ /* lookup table to find number of leading zeroes */ -extern FILE *in, *out; +/*extern FILE *in, *out; */ byte negbuff[BUFSIZE+4]; /* byte I/O buffer, allowing for 4 "negative" locations */ @@ -77,7 +78,7 @@ int zeroLUT[256]; /* table to find out number of leading zeros */ /* BIT I/O variables */ dword reg; /* BIT buffer for input/output */ int bits; /* number of bits free in bit buffer (on output) */ - /* (number of bits free)-8 in bit buffer (on input)*/ + /* (number of bits free)-8 in bit buffer (on input)*/ /**************************************************************************** @@ -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<