Skip to content

Commit 645ebcd

Browse files
committed
Avoid some maybe uninitialized warnings in ffi
All false positives.
1 parent 79a84e0 commit 645ebcd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/ffi/ffi.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2980,6 +2980,7 @@ ZEND_METHOD(FFI, load) /* {{{ */
29802980
ZEND_FFI_ATTR_STORED;
29812981

29822982
scope_name = NULL;
2983+
scope_name_len = 0;
29832984
lib = NULL;
29842985
code_pos = zend_ffi_parse_directives(filename, code, &scope_name, &lib, preload);
29852986
if (!code_pos) {
@@ -3382,7 +3383,7 @@ static void zend_ffi_tags_cleanup(zend_ffi_dcl *dcl) /* {{{ */
33823383
ZEND_METHOD(FFI, new) /* {{{ */
33833384
{
33843385
zend_string *type_def = NULL;
3385-
zval *ztype;
3386+
zval *ztype = NULL;
33863387
zend_ffi_type *type, *type_ptr;
33873388
zend_ffi_cdata *cdata;
33883389
void *ptr;
@@ -3533,7 +3534,7 @@ ZEND_METHOD(FFI, free) /* {{{ */
35333534
ZEND_METHOD(FFI, cast) /* {{{ */
35343535
{
35353536
zend_string *type_def = NULL;
3536-
zval *ztype;
3537+
zval *ztype = NULL;
35373538
zend_ffi_type *old_type, *type, *type_ptr;
35383539
zend_ffi_cdata *old_cdata, *cdata;
35393540
zend_bool is_const = 0;

0 commit comments

Comments
 (0)