(libz) Silence some warnings - use INT64_C/UINT64_C

This commit is contained in:
twinaphex 2020-07-29 04:41:13 +02:00
parent 8eb7c1d226
commit 1f0529a275
2 changed files with 5 additions and 4 deletions

8
deps/libz/inflate.c vendored
View file

@ -427,7 +427,7 @@ static int updatewindow(z_streamp strm, const Bytef *end, unsigned copy)
if (state->window == Z_NULL)
{
state->window = (unsigned char FAR *)
calloc(1U << state->wbits,
calloc(UINT64_C(1) << state->wbits,
sizeof(unsigned char));
if (state->window == Z_NULL)
return 1;
@ -436,7 +436,7 @@ static int updatewindow(z_streamp strm, const Bytef *end, unsigned copy)
/* if window not in use yet, initialize */
if (state->wsize == 0)
{
state->wsize = 1U << state->wbits;
state->wsize = UINT64_C(1) << state->wbits;
state->wnext = 0;
state->whave = 0;
}
@ -1447,7 +1447,7 @@ int inflateCopy(z_streamp dest, z_streamp source)
if (state->window != Z_NULL)
{
window = (unsigned char FAR *)
calloc(1U << state->wbits, sizeof(unsigned char));
calloc(UINT64_C(1) << state->wbits, sizeof(unsigned char));
if (window == Z_NULL)
{
free(copy);
@ -1511,7 +1511,7 @@ long inflateMark(z_streamp strm)
if ( strm == Z_NULL ||
strm->state == Z_NULL)
return -(1L << 16);
return -(INT64_C(1) << 16);
state = (struct inflate_state FAR *)strm->state;
return (long)(((unsigned long)((long)state->back)) << 16) +

View file

@ -33,6 +33,7 @@
#include <compat/fnmatch.h>
#include <compat/strl.h>
#include <string/stdstring.h>
#include <retro_miscellaneous.h>
#include "libretrodb.h"
#include "query.h"