From 3fb251b363866417122fe54a158a1ac5a7837101 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Wed, 21 Sep 2016 20:07:37 -0700 Subject: 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." --- zutil.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'zutil.c') diff --git a/zutil.c b/zutil.c index 167ed5f..a6b887e 100644 --- a/zutil.c +++ b/zutil.c @@ -10,10 +10,6 @@ # include "gzguts.h" #endif -#ifndef NO_DUMMY_DECL -struct internal_state {int dummy;}; /* for buggy compilers */ -#endif - z_const char * const z_errmsg[10] = { "need dictionary", /* Z_NEED_DICT 2 */ "stream end", /* Z_STREAM_END 1 */ -- cgit v1.2.3-55-g6feb