summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjca <jca@openbsd.org>2019-06-01 11:39:57 +0000
committerjca <jca@openbsd.org>2019-06-01 11:39:57 +0000
commitefa1b761c4e11fe0d2a966c345b8c2f7c2be779e (patch)
tree004f2ef48d62513defcedbac0ac000e382cd90ec
parentMake sure that the IMSG_CTL_RESET message is sent immediately. (diff)
downloadwireguard-openbsd-efa1b761c4e11fe0d2a966c345b8c2f7c2be779e.tar.xz
wireguard-openbsd-efa1b761c4e11fe0d2a966c345b8c2f7c2be779e.zip
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.
-rw-r--r--lib/libz/infback.c2
-rw-r--r--lib/libz/inffast.c6
-rw-r--r--lib/libz/inflate.c8
-rw-r--r--sys/lib/libz/infback.c2
-rw-r--r--sys/lib/libz/inffast.c6
-rw-r--r--sys/lib/libz/inflate.c8
6 files changed, 16 insertions, 16 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;
diff --git a/sys/lib/libz/infback.c b/sys/lib/libz/infback.c
index 53879e161be..e9803588915 100644
--- a/sys/lib/libz/infback.c
+++ b/sys/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/sys/lib/libz/inffast.c b/sys/lib/libz/inffast.c
index 9791a34e04e..9e7b53f715c 100644
--- a/sys/lib/libz/inffast.c
+++ b/sys/lib/libz/inffast.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inffast.c,v 1.11 2005/07/20 15:56:46 millert Exp $ */
+/* $OpenBSD: inffast.c,v 1.12 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/sys/lib/libz/inflate.c b/sys/lib/libz/inflate.c
index 5204a869c70..27bfb1c5fd6 100644
--- a/sys/lib/libz/inflate.c
+++ b/sys/lib/libz/inflate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inflate.c,v 1.14 2016/03/23 19:39:48 natano Exp $ */
+/* $OpenBSD: inflate.c,v 1.15 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;