summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2019-06-01 11:39:58 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2019-06-01 11:39:58 +0000
commit5dc3d482c1cf40ac55ebf387564b5fc3701268ee (patch)
treecd69da8695d82c693ebe3f6252a24bfbb1d68ab2 /lib
parent914ec0b5716bbd83f15ba135ed97b2d25528f167 (diff)
Fix warnings when building zlib with ZLIB_CONST defined
Probably not very useful (given the lack of feedback) but feels more correct. Kernel part tested with option ZLIB_CONST.
Diffstat (limited to 'lib')
-rw-r--r--lib/libz/infback.c2
-rw-r--r--lib/libz/inffast.c6
-rw-r--r--lib/libz/inflate.c8
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/libz/infback.c b/lib/libz/infback.c
index 53879e161be..e9803588915 100644
--- a/lib/libz/infback.c
+++ b/lib/libz/infback.c
@@ -246,7 +246,7 @@ out_func out;
void FAR *out_desc;
{
struct inflate_state FAR *state;
- unsigned char FAR *next; /* next input */
+ z_const unsigned char FAR *next; /* next input */
unsigned char FAR *put; /* next output */
unsigned have, left; /* available input and output */
unsigned long hold; /* bit buffer */
diff --git a/lib/libz/inffast.c b/lib/libz/inffast.c
index e4c62b1407f..988806ca3c1 100644
--- a/lib/libz/inffast.c
+++ b/lib/libz/inffast.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inffast.c,v 1.7 2005/07/20 15:56:41 millert Exp $ */
+/* $OpenBSD: inffast.c,v 1.8 2019/06/01 11:39:57 jca Exp $ */
/* inffast.c -- fast decoding
* Copyright (C) 1995-2004 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
@@ -70,8 +70,8 @@ z_streamp strm;
unsigned start; /* inflate()'s starting value for strm->avail_out */
{
struct inflate_state FAR *state;
- unsigned char FAR *in; /* local strm->next_in */
- unsigned char FAR *last; /* while in < last, enough input available */
+ z_const unsigned char FAR *in; /* local strm->next_in */
+ z_const unsigned char FAR *last; /* while in < last, enough input available */
unsigned char FAR *out; /* local strm->next_out */
unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
unsigned char FAR *end; /* while out < end, enough space available */
diff --git a/lib/libz/inflate.c b/lib/libz/inflate.c
index 23281f9ce77..37930a9f261 100644
--- a/lib/libz/inflate.c
+++ b/lib/libz/inflate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inflate.c,v 1.9 2005/07/20 15:56:41 millert Exp $ */
+/* $OpenBSD: inflate.c,v 1.10 2019/06/01 11:39:57 jca Exp $ */
/* inflate.c -- zlib decompression
* Copyright (C) 1995-2005 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
@@ -98,7 +98,7 @@ local int updatewindow OF((z_streamp strm, unsigned out));
#ifdef BUILDFIXED
void makefixed OF((void));
#endif
-local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
+local unsigned syncsearch OF((unsigned FAR *have, z_const unsigned char FAR *buf,
unsigned len));
int ZEXPORT inflateReset(strm)
@@ -557,7 +557,7 @@ z_streamp strm;
int flush;
{
struct inflate_state FAR *state;
- unsigned char FAR *next; /* next input */
+ z_const unsigned char FAR *next; /* next input */
unsigned char FAR *put; /* next output */
unsigned have, left; /* available input and output */
unsigned long hold; /* bit buffer */
@@ -1317,7 +1317,7 @@ gz_headerp head;
*/
local unsigned syncsearch(have, buf, len)
unsigned FAR *have;
-unsigned char FAR *buf;
+z_const unsigned char FAR *buf;
unsigned len;
{
unsigned got;