Browse Source

Fix -Wmissing-braces warnings

Unfortunate that = {} is a GNU extension.
pull/4251/head
Nikita Popov 6 years ago
parent
commit
f601eb15e6
  1. 3
      Zend/zend_compile.c
  2. 2
      ext/pdo/pdo_stmt.c
  3. 4
      ext/sockets/multicast.c

3
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);

2
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) {

4
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));

Loading…
Cancel
Save