]> granicus.if.org Git - php/commitdiff
Avoid some maybe uninitialized warnings in ffi
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 7 May 2019 13:21:08 +0000 (15:21 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 7 May 2019 13:44:22 +0000 (15:44 +0200)
All false positives.

ext/ffi/ffi.c

index a0603086c51bb3121cda1b2520db2d08cdb1d5ed..72ff4b8e5897e232f5849ad8b52c16ffa9036516 100644 (file)
@@ -2980,6 +2980,7 @@ ZEND_METHOD(FFI, load) /* {{{ */
                ZEND_FFI_ATTR_STORED;
 
        scope_name = NULL;
+       scope_name_len = 0;
        lib = NULL;
        code_pos = zend_ffi_parse_directives(filename, code, &scope_name, &lib, preload);
        if (!code_pos) {
@@ -3382,7 +3383,7 @@ static void zend_ffi_tags_cleanup(zend_ffi_dcl *dcl) /* {{{ */
 ZEND_METHOD(FFI, new) /* {{{ */
 {
        zend_string *type_def = NULL;
-       zval *ztype;
+       zval *ztype = NULL;
        zend_ffi_type *type, *type_ptr;
        zend_ffi_cdata *cdata;
        void *ptr;
@@ -3533,7 +3534,7 @@ ZEND_METHOD(FFI, free) /* {{{ */
 ZEND_METHOD(FFI, cast) /* {{{ */
 {
        zend_string *type_def = NULL;
-       zval *ztype;
+       zval *ztype = NULL;
        zend_ffi_type *old_type, *type, *type_ptr;
        zend_ffi_cdata *old_cdata, *cdata;
        zend_bool is_const = 0;