aboutsummaryrefslogtreecommitdiff
path: root/zutil.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2012-08-12 18:08:52 -0700
committerMark Adler <madler@alumni.caltech.edu>2012-08-13 00:02:40 -0700
commit62d6112a7981ad7c34f3b43cffdf00d4662a4f25 (patch)
treeaed93070f7e1be31868dce1d62a1de6ffc1360f9 /zutil.c
parentfb4e0599a5ddaef9eee726f786b9edef4943432b (diff)
downloadzlib-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 'zutil.c')
-rw-r--r--zutil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zutil.c b/zutil.c
index 65e0d3b..23d2ebe 100644
--- a/zutil.c
+++ b/zutil.c
@@ -14,7 +14,7 @@
14struct internal_state {int dummy;}; /* for buggy compilers */ 14struct internal_state {int dummy;}; /* for buggy compilers */
15#endif 15#endif
16 16
17const char * const z_errmsg[10] = { 17z_const char * const z_errmsg[10] = {
18"need dictionary", /* Z_NEED_DICT 2 */ 18"need dictionary", /* Z_NEED_DICT 2 */
19"stream end", /* Z_STREAM_END 1 */ 19"stream end", /* Z_STREAM_END 1 */
20"", /* Z_OK 0 */ 20"", /* Z_OK 0 */