diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2012-08-12 18:08:52 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2012-08-13 00:02:40 -0700 |
commit | 62d6112a7981ad7c34f3b43cffdf00d4662a4f25 (patch) | |
tree | aed93070f7e1be31868dce1d62a1de6ffc1360f9 /contrib | |
parent | fb4e0599a5ddaef9eee726f786b9edef4943432b (diff) | |
download | zlib-62d6112a7981ad7c34f3b43cffdf00d4662a4f25.tar.gz zlib-62d6112a7981ad7c34f3b43cffdf00d4662a4f25.tar.bz2 zlib-62d6112a7981ad7c34f3b43cffdf00d4662a4f25.zip |
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.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/infback9/infback9.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; | |||
222 | void FAR *out_desc; | 222 | void FAR *out_desc; |
223 | { | 223 | { |
224 | struct inflate_state FAR *state; | 224 | struct inflate_state FAR *state; |
225 | unsigned char FAR *next; /* next input */ | 225 | z_const unsigned char FAR *next; /* next input */ |
226 | unsigned char FAR *put; /* next output */ | 226 | unsigned char FAR *put; /* next output */ |
227 | unsigned have; /* available input */ | 227 | unsigned have; /* available input */ |
228 | unsigned long left; /* available output */ | 228 | unsigned long left; /* available output */ |