aboutsummaryrefslogtreecommitdiff
path: root/zutil.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2016-09-21 20:07:37 -0700
committerMark Adler <madler@alumni.caltech.edu>2016-09-21 20:34:04 -0700
commit3fb251b363866417122fe54a158a1ac5a7837101 (patch)
treea4cd8da8fa279c66c533b0008192cb8da55bd5e0 /zutil.c
parent33a7aff45da511c3fc181071394ad9a01d5e8d61 (diff)
downloadzlib-3fb251b363866417122fe54a158a1ac5a7837101.tar.gz
zlib-3fb251b363866417122fe54a158a1ac5a7837101.tar.bz2
zlib-3fb251b363866417122fe54a158a1ac5a7837101.zip
Remove dummy structure declarations for old buggy compilers.
While woolly mammoths still roamed the Earth and before Atlantis sunk into the ocean, there were C compilers that could not handle forward structure references, e.g. "struct name;". zlib dutifully provided a work-around for such compilers. That work-around is no longer needed, and, per the recommendation of a security audit of the zlib code by Trail of Bits and TrustInSoft, in support of the Mozilla Foundation, should be removed since what a compiler will do with this is technically undefined. From the report: "there is no telling what interactions the bug could have in the future with link-time optimizations and type-based alias analyses, both features that are present (but not default) in clang."
Diffstat (limited to 'zutil.c')
-rw-r--r--zutil.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/zutil.c b/zutil.c
index 167ed5f..a6b887e 100644
--- a/zutil.c
+++ b/zutil.c
@@ -10,10 +10,6 @@
10# include "gzguts.h" 10# include "gzguts.h"
11#endif 11#endif
12 12
13#ifndef NO_DUMMY_DECL
14struct internal_state {int dummy;}; /* for buggy compilers */
15#endif
16
17z_const char * const z_errmsg[10] = { 13z_const char * const z_errmsg[10] = {
18"need dictionary", /* Z_NEED_DICT 2 */ 14"need dictionary", /* Z_NEED_DICT 2 */
19"stream end", /* Z_STREAM_END 1 */ 15"stream end", /* Z_STREAM_END 1 */