From b95f0ebc47ba4d8d172317b81b99a13b8c20a272 Mon Sep 17 00:00:00 2001 From: ndossche <7771979+ndossche@users.noreply.github.com> Date: Sat, 14 Mar 2026 15:06:57 +0100 Subject: [PATCH] ext/zip: Fix const-generic compile warning --- ext/zip/zip_stream.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ext/zip/zip_stream.c b/ext/zip/zip_stream.c index a32324347d6..496fd9cdfeb 100644 --- a/ext/zip/zip_stream.c +++ b/ext/zip/zip_stream.c @@ -125,12 +125,11 @@ static int php_zip_ops_stat(php_stream *stream, php_stream_statbuf *ssb) /* {{{ size_t path_len = strlen(stream->orig_path); char file_dirname[MAXPATHLEN]; struct zip *za; - char *fragment; size_t fragment_len; int err; zend_string *file_basename; - fragment = strchr(path, '#'); + const char *fragment = strchr(path, '#'); if (!fragment) { return -1; } @@ -286,14 +285,13 @@ php_stream *php_stream_zip_opener(php_stream_wrapper *wrapper, struct zip *za; struct zip_file *zf = NULL; - char *fragment; size_t fragment_len; int err; php_stream *stream = NULL; struct php_zip_stream_data_t *self; - fragment = strchr(path, '#'); + const char *fragment = strchr(path, '#'); if (!fragment) { return NULL; }