(zlib) Add forward declarations to silence warnings

This commit is contained in:
twinaphex 2014-10-21 01:22:57 +02:00
parent 4134b3de69
commit f6a4017127
2 changed files with 19 additions and 9 deletions

8
deps/rzlib/gzlib.c vendored
View File

@ -15,6 +15,10 @@
#endif
#endif
/* Forward declarations */
z_off_t ZEXPORT gzoffset(gzFile file);
int ZEXPORT gzbuffer(gzFile file, unsigned size);
/* Local functions */
local void gz_reset OF((gz_statep));
local gzFile gz_open OF((const void *, int, const char *));
@ -476,9 +480,7 @@ z_off64_t ZEXPORT gzoffset64(gzFile file)
/* -- see zlib.h -- */
z_off_t ZEXPORT gzoffset(gzFile file)
{
z_off64_t ret;
ret = gzoffset64(file);
z_off64_t ret = gzoffset64(file);
return ret == (z_off_t)ret ? (z_off_t)ret : -1;
}

20
deps/rzlib/inflate.c vendored
View File

@ -96,6 +96,7 @@
#endif
/* function prototypes */
int ZEXPORT inflateReset2(z_streamp strm, int windowBits);
local void fixedtables OF((struct inflate_state FAR *state));
local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
unsigned copy));
@ -105,8 +106,12 @@ void makefixed OF((void));
local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf,
unsigned len));
long ZEXPORT inflateMark(z_streamp strm);
int ZEXPORT inflateResetKeep(z_streamp strm);
int ZEXPORT inflateUndermine(z_streamp strm, int subvert);
int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary, uInt *dictLength);
int ZEXPORT inflateResetKeep(z_streamp strm)
@ -148,10 +153,11 @@ int ZEXPORT inflateReset(z_streamp strm)
int ZEXPORT inflateReset2(z_streamp strm, int windowBits)
{
int wrap;
struct inflate_state FAR *state;
struct inflate_state FAR *state = NULL;
/* get the state */
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
if (strm == Z_NULL || strm->state == Z_NULL)
return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
/* extract wrap request from windowBits parameter */
@ -1456,9 +1462,10 @@ int ZEXPORT inflateCopy(z_streamp dest, z_streamp source)
int ZEXPORT inflateUndermine(z_streamp strm, int subvert)
{
struct inflate_state FAR *state;
struct inflate_state FAR *state = NULL;
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
if (strm == Z_NULL || strm->state == Z_NULL)
return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
state->sane = !subvert;
#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
@ -1471,9 +1478,10 @@ int ZEXPORT inflateUndermine(z_streamp strm, int subvert)
long ZEXPORT inflateMark(z_streamp strm)
{
struct inflate_state FAR *state;
struct inflate_state FAR *state = NULL;
if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
if (strm == Z_NULL || strm->state == Z_NULL)
return -1L << 16;
state = (struct inflate_state FAR *)strm->state;
return ((long)(state->back) << 16) +
(state->mode == COPY ? state->length :