diff options
| author | Mika Lindqvist <postmaster@raasu.org> | 2026-03-06 20:06:12 +0200 |
|---|---|---|
| committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2026-03-07 00:52:14 +0100 |
| commit | a56d0201b7895055acd8f8d190cca066f8a7f520 (patch) | |
| tree | ae507569630f09768ade3c10f9254fb5fae43ae2 | |
| parent | 2361f373cae26969eb8fd38a7e3e024e366254b1 (diff) | |
| download | Project-Tick-a56d0201b7895055acd8f8d190cca066f8a7f520.tar.gz Project-Tick-a56d0201b7895055acd8f8d190cca066f8a7f520.zip | |
Fix building with C23 support
* Z_UNREACHABLE() macro can't be followed by any code in same block scope
| -rw-r--r-- | deflate.c | 2 | ||||
| -rw-r--r-- | gzread.c | 2 |
2 files changed, 4 insertions, 0 deletions
@@ -712,7 +712,9 @@ unsigned long Z_EXPORT PREFIX(deflateBound)(PREFIX3(stream) *strm, unsigned long #endif default: /* for compiler happiness */ Z_UNREACHABLE(); +#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 202311L wraplen = ZLIB_WRAPLEN; +#endif } /* if not default parameters, return conservative bound */ @@ -233,7 +233,9 @@ static int gz_fetch(gz_state *state) { continue; default: // Can't happen Z_UNREACHABLE(); +#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 202311L return -1; +#endif } } while (state->x.have == 0 && (!state->eof || strm->avail_in)); return 0; |
