Skip to content

Commit e0ac74f

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: ext/zip: Fix const-generic compile warning
2 parents ed3eb85 + b95f0eb commit e0ac74f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ext/zip/zip_stream.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,11 @@ static int php_zip_ops_stat(php_stream *stream, php_stream_statbuf *ssb) /* {{{
125125
size_t path_len = strlen(stream->orig_path);
126126
char file_dirname[MAXPATHLEN];
127127
struct zip *za;
128-
char *fragment;
129128
size_t fragment_len;
130129
int err;
131130
zend_string *file_basename;
132131

133-
fragment = strchr(path, '#');
132+
const char *fragment = strchr(path, '#');
134133
if (!fragment) {
135134
return -1;
136135
}
@@ -286,14 +285,13 @@ php_stream *php_stream_zip_opener(php_stream_wrapper *wrapper,
286285

287286
struct zip *za;
288287
struct zip_file *zf = NULL;
289-
char *fragment;
290288
size_t fragment_len;
291289
int err;
292290

293291
php_stream *stream = NULL;
294292
struct php_zip_stream_data_t *self;
295293

296-
fragment = strchr(path, '#');
294+
const char *fragment = strchr(path, '#');
297295
if (!fragment) {
298296
return NULL;
299297
}

0 commit comments

Comments
 (0)