Skip to content

Commit 7d36703

Browse files
committed
Initialize blacklist_path_length
For some reason, GCC warns[1]: | ‘blacklist_path_length’ may be used uninitialized in this function | [-Werror=maybe-uninitialized] This looks like a false positive to me, but it doesn't hurt to explicitly initialize the variable. [1] <https://github.com/php/php-src/runs/7502212969?check_suite_focus=true> Closes GH-9129.
1 parent 4834cfe commit 7d36703

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/opcache/zend_accelerator_blacklist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ static void zend_accel_blacklist_loadone(zend_blacklist *blacklist, char *filena
241241
{
242242
char buf[MAXPATHLEN + 1], real_path[MAXPATHLEN + 1], *blacklist_path = NULL;
243243
FILE *fp;
244-
int path_length, blacklist_path_length;
244+
int path_length, blacklist_path_length = 0;
245245

246246
if ((fp = fopen(filename, "r")) == NULL) {
247247
zend_accel_error(ACCEL_LOG_WARNING, "Cannot load blacklist file: %s\n", filename);

0 commit comments

Comments
 (0)