treewide: fix C++20 compilation error wrt. designated initializers

C++20 introduced designated initializers similar to the ones found
in C99, however, in C++ designated initializers cannot be mixed
with non-designated initializers. GCC rejects mixed initializers
with an error.
This commit is contained in:
Barnabás Pőcze 2024-05-02 03:24:35 +02:00 committed by Wim Taymans
parent d32259373b
commit f81f2f8d38
6 changed files with 7 additions and 7 deletions

View file

@ -223,7 +223,7 @@ static inline int spa_graph_node_impl_sub_process(void *data SPA_UNUSED, struct
}
static const struct spa_graph_node_callbacks spa_graph_node_sub_impl_default = {
SPA_VERSION_GRAPH_NODE_CALLBACKS,
.version = SPA_VERSION_GRAPH_NODE_CALLBACKS,
.process = spa_graph_node_impl_sub_process,
};
@ -330,7 +330,7 @@ static inline int spa_graph_node_impl_reuse_buffer(void *data, struct spa_graph_
}
static const struct spa_graph_node_callbacks spa_graph_node_impl_default = {
SPA_VERSION_GRAPH_NODE_CALLBACKS,
.version = SPA_VERSION_GRAPH_NODE_CALLBACKS,
.process = spa_graph_node_impl_process,
.reuse_buffer = spa_graph_node_impl_reuse_buffer,
};

View file

@ -41,7 +41,7 @@ static inline void spa_pod_dynamic_builder_init(struct spa_pod_dynamic_builder *
void *data, uint32_t size, uint32_t extend)
{
static const struct spa_pod_builder_callbacks spa_pod_dynamic_builder_callbacks = {
SPA_VERSION_POD_BUILDER_CALLBACKS,
.version = SPA_VERSION_POD_BUILDER_CALLBACKS,
.overflow = spa_pod_dynamic_builder_overflow
};
builder->b = SPA_POD_BUILDER_INIT(data, size);