From 62d6112a7981ad7c34f3b43cffdf00d4662a4f25 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sun, 12 Aug 2012 18:08:52 -0700 Subject: Clean up the usage of z_const and respect const usage within zlib. This patch allows zlib to compile cleanly with the -Wcast-qual gcc warning enabled, but only if ZLIB_CONST is defined, which adds const to next_in and msg in z_stream and in the in_func prototype. A --const option is added to ./configure which adds -DZLIB_CONST to the compile flags, and adds -Wcast-qual to the compile flags when ZLIBGCCWARN is set in the environment. --- contrib/infback9/infback9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/infback9/infback9.c b/contrib/infback9/infback9.c index 3691d4a..05fb3e3 100644 --- a/contrib/infback9/infback9.c +++ b/contrib/infback9/infback9.c @@ -222,7 +222,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; /* available input */ unsigned long left; /* available output */ -- cgit v1.2.3-55-g6feb