com php-src: Fix -Wmissing-braces warnings: Zend/zend_compile .c ext/pdo/pdo_stmt.c ext/sockets/multicast.c

From: Date: Wed, 12 Jun 2019 09:54:12 +0000
Subject: com php-src: Fix -Wmissing-braces warnings: Zend/zend_compile .c ext/pdo/pdo_stmt.c ext/sockets/multicast.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-106704@lists.php.net to get a copy of this message
Commit: f601eb15e63590f00acd3453dbc24d4caaed1182 Author: Nikita Popov <nikita.ppv@gmail.com> Wed, 12 Jun 2019 10:50:58 +0200 Parents: 06ddc025ac3ad09bdd344cb4779427c81dece9fd Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f601eb15e63590f00acd3453dbc24d4caaed1182 Log: Fix -Wmissing-braces warnings Unfortunate that = {} is a GNU extension. Changed paths: M Zend/zend_compile.c M ext/pdo/pdo_stmt.c M ext/sockets/multicast.c Diff: diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 85c0bf8..0837c5b 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -5872,7 +5872,8 @@ void zend_compile_func_decl(znode *result, zend_ast *ast, zend_bool toplevel) /* zend_op_array *orig_op_array = CG(active_op_array); zend_op_array *op_array = zend_arena_alloc(&CG(arena), sizeof(zend_op_array)); zend_oparray_context orig_oparray_context; - closure_info info = {0}; + closure_info info; + memset(&info, 0, sizeof(closure_info)); init_op_array(op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE); diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index bd93ca3..1fc114c 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -821,7 +821,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, enum pdo_ { int flags, idx, old_arg_count = 0; zend_class_entry *ce = NULL, *old_ce = NULL; - zval grp_val, *pgrp, retval, old_ctor_args = {0}; + zval grp_val, *pgrp, retval, old_ctor_args = {{0}}; int colno; if (how == PDO_FETCH_USE_DEFAULT) { diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c index af7165e..2ede92b 100644 --- a/ext/sockets/multicast.c +++ b/ext/sockets/multicast.c @@ -463,7 +463,7 @@ static int _php_mcast_join_leave( sizeof(greq)); #else if (sock->type == AF_INET) { - struct ip_mreq mreq = {0}; + struct ip_mreq mreq = {{0}}; struct in_addr addr; assert(group_len == sizeof(struct sockaddr_in)); @@ -483,7 +483,7 @@ static int _php_mcast_join_leave( } #if HAVE_IPV6 else if (sock->type == AF_INET6) { - struct ipv6_mreq mreq = {0}; + struct ipv6_mreq mreq = {{0}}; assert(group_len == sizeof(struct sockaddr_in6));

« previous php.cvs (#106704) next »