From 645ebcdfbfb2adc35aa714485d1685e8b2f8c3e2 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 7 May 2019 15:21:08 +0200 Subject: [PATCH] Avoid some maybe uninitialized warnings in ffi All false positives. --- ext/ffi/ffi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.40.0