Skip to content

Commit c197fad

Browse files
committed
Merge branch 'PHP-8.5'
* PHP-8.5: ext/zip: Fix const-generic compile warning
2 parents 605c075 + e0ac74f commit c197fad

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
@@ -118,12 +118,11 @@ static int php_zip_ops_stat(php_stream *stream, php_stream_statbuf *ssb) /* {{{
118118
size_t path_len = strlen(stream->orig_path);
119119
char file_dirname[MAXPATHLEN];
120120
struct zip *za;
121-
char *fragment;
122121
size_t fragment_len;
123122
int err;
124123
zend_string *file_basename;
125124

126-
fragment = strchr(path, '#');
125+
const char *fragment = strchr(path, '#');
127126
if (!fragment) {
128127
return -1;
129128
}
@@ -281,14 +280,13 @@ php_stream *php_stream_zip_opener(php_stream_wrapper *wrapper,
281280

282281
struct zip *za;
283282
struct zip_file *zf = NULL;
284-
char *fragment;
285283
size_t fragment_len;
286284
int err;
287285

288286
php_stream *stream = NULL;
289287
struct php_zip_stream_data_t *self;
290288

291-
fragment = strchr(path, '#');
289+
const char *fragment = strchr(path, '#');
292290
if (!fragment) {
293291
return NULL;
294292
}

0 commit comments

Comments
 (0)