From 925679b057a66a94916d29f63143eb8cc35d61dc Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 15 Apr 2020 01:28:19 +0200 Subject: [PATCH] Fix [-Wjump-misses-init] in spl_directory.c by adding an inner scope --- ext/spl/spl_directory.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index af7185ac71..2472f555a9 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -516,6 +516,7 @@ static spl_filesystem_object *spl_filesystem_object_create_type(int num_args, sp } break; case SPL_FS_FILE: + { ce = ce ? ce : source->file_class; if (UNEXPECTED(zend_update_class_constants(ce) != SUCCESS)) { @@ -563,6 +564,7 @@ static spl_filesystem_object *spl_filesystem_object_create_type(int num_args, sp } } break; + } case SPL_FS_DIR: zend_restore_error_handling(&error_handling); zend_throw_exception_ex(spl_ce_RuntimeException, 0, "Operation not supported"); -- 2.40.0