]> granicus.if.org Git - php/commitdiff
Fix [-Wjump-misses-init] in spl_directory.c by adding an inner scope
authorGeorge Peter Banyard <girgias@php.net>
Tue, 14 Apr 2020 23:28:19 +0000 (01:28 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Sat, 18 Apr 2020 12:52:48 +0000 (14:52 +0200)
ext/spl/spl_directory.c

index af7185ac7113b51d65747c440089d88922f5efd3..2472f555a999996345c30eb798c07bea4b6bf725 100644 (file)
@@ -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");