From 3332e271be035c9df12666cea7702cc31adf9105 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 4 Jun 2021 13:45:06 +1000 Subject: [PATCH] spa: fix compiler warnings about missing braces in initializer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First element is a spa_list, so {{0}} it is. ../spa/include/spa/node/utils.h:98:40: warning: missing braces around initializer for ‘spa_list’ [-Wmissing-braces] 98 | struct spa_hook listener = { 0 }; --- spa/include/spa/monitor/utils.h | 2 +- spa/include/spa/node/utils.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spa/include/spa/monitor/utils.h b/spa/include/spa/monitor/utils.h index 7b3c4ebbe..a248cc69f 100644 --- a/spa/include/spa/monitor/utils.h +++ b/spa/include/spa/monitor/utils.h @@ -57,7 +57,7 @@ static inline int spa_device_enum_params_sync(struct spa_device *device, struct spa_pod_builder *builder) { struct spa_result_device_params_data data = { builder, }; - struct spa_hook listener = { 0 }; + struct spa_hook listener = {{0}}; static const struct spa_device_events device_events = { SPA_VERSION_DEVICE_EVENTS, .result = spa_result_func_device_params, diff --git a/spa/include/spa/node/utils.h b/spa/include/spa/node/utils.h index b0ad1779d..35983bd2d 100644 --- a/spa/include/spa/node/utils.h +++ b/spa/include/spa/node/utils.h @@ -63,7 +63,7 @@ static inline int spa_node_enum_params_sync(struct spa_node *node, struct spa_pod_builder *builder) { struct spa_result_node_params_data data = { builder, }; - struct spa_hook listener = { 0 }; + struct spa_hook listener = {{0}}; static const struct spa_node_events node_events = { SPA_VERSION_NODE_EVENTS, .result = spa_result_func_node_params, @@ -95,7 +95,7 @@ static inline int spa_node_port_enum_params_sync(struct spa_node *node, struct spa_pod_builder *builder) { struct spa_result_node_params_data data = { builder, }; - struct spa_hook listener = { 0 }; + struct spa_hook listener = {{0}}; static const struct spa_node_events node_events = { SPA_VERSION_NODE_EVENTS, .result = spa_result_func_node_params,