From: Nikita Popov Date: Tue, 7 May 2019 13:21:08 +0000 (+0200) Subject: Avoid some maybe uninitialized warnings in ffi X-Git-Tag: php-7.4.0alpha1~340 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=645ebcdfbfb2adc35aa714485d1685e8b2f8c3e2;p=php Avoid some maybe uninitialized warnings in ffi All false positives. --- diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index a0603086c5..72ff4b8e58 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -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;