summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--deflate.c2
-rw-r--r--gzread.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/deflate.c b/deflate.c
index 81e1ac5a5f..a0256cb01a 100644
--- a/deflate.c
+++ b/deflate.c
@@ -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 */
diff --git a/gzread.c b/gzread.c
index 11273e415c..10ed519f2c 100644
--- a/gzread.c
+++ b/gzread.c
@@ -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;