summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-06-12 10:50:58 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-06-12 11:54:12 +0200
commitf601eb15e63590f00acd3453dbc24d4caaed1182 (patch)
treec33aa41158145b5d7691ec27c91470f93155bc58
parent06ddc025ac3ad09bdd344cb4779427c81dece9fd (diff)
downloadphp-git-f601eb15e63590f00acd3453dbc24d4caaed1182.tar.gz
Fix -Wmissing-braces warnings
Unfortunate that = {} is a GNU extension.
-rw-r--r--Zend/zend_compile.c3
-rw-r--r--ext/pdo/pdo_stmt.c2
-rw-r--r--ext/sockets/multicast.c4
3 files changed, 5 insertions, 4 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 85c0bf8cd5..0837c5b0b8 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 bd93ca3cb2..1fc114ccf9 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 af7165e8e0..2ede92bc6e 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));