From 1567dd4e3a675626507215cd976830c3499fada0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 21 May 2021 10:04:33 +1000 Subject: [PATCH] doc: fix some missing parameter warnings Where both declaration and definition are documented, drop one and rely on the other. Drop the obvious documentations where not needed, doxygen wants either none or all parameters documented. --- src/pipewire/context.h | 2 +- src/pipewire/core.h | 15 +++++++++------ src/pipewire/filter.h | 6 ++++-- src/pipewire/global.c | 1 + src/pipewire/global.h | 2 +- src/pipewire/impl-module.c | 1 + src/pipewire/impl-module.h | 6 +++--- src/pipewire/stream.h | 3 ++- 8 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/pipewire/context.h b/src/pipewire/context.h index 88c1ac1eb..45ac61288 100644 --- a/src/pipewire/context.h +++ b/src/pipewire/context.h @@ -148,7 +148,7 @@ struct pw_work_queue *pw_context_get_work_queue(struct pw_context *context); * 0 to fetch the next item, any other value stops the iteration and returns * the value. When all callbacks return 0, this function returns 0 when all * globals are iterated. */ -int pw_context_for_each_global(struct pw_context *context, /**< the context */ +int pw_context_for_each_global(struct pw_context *context, int (*callback) (void *data, struct pw_global *global), void *data); diff --git a/src/pipewire/core.h b/src/pipewire/core.h index 1fbaa02bf..4213ba738 100644 --- a/src/pipewire/core.h +++ b/src/pipewire/core.h @@ -515,15 +515,18 @@ pw_context_connect(struct pw_context *context, /**< a \ref pw_context */ size_t user_data_size /**< extra user data size */); /** Connect to a PipeWire instance on the given socket \memberof pw_core + * \param context a \ref pw_context * \param fd the connected socket to use, the socket will be closed * automatically on disconnect or error. - * \return a pw_core on success or NULL with errno set on error */ + * \param properties optional properties, ownership of the properties is + * taken. + * \param user_data_size extra user data size + * \return a \ref pw_core on success or NULL with errno set on error */ struct pw_core * -pw_context_connect_fd(struct pw_context *context, /**< a \ref pw_context */ - int fd, /**< an fd */ - struct pw_properties *properties, /**< optional properties, ownership of - * the properties is taken.*/ - size_t user_data_size /**< extra user data size */); +pw_context_connect_fd(struct pw_context *context, + int fd, + struct pw_properties *properties, + size_t user_data_size); /** Connect to a given PipeWire instance \memberof pw_core * \return a pw_core on success or NULL with errno set on error */ diff --git a/src/pipewire/filter.h b/src/pipewire/filter.h index 9059e75c3..2a5e29a53 100644 --- a/src/pipewire/filter.h +++ b/src/pipewire/filter.h @@ -170,7 +170,7 @@ pw_filter_get_node_id(struct pw_filter *filter); int pw_filter_disconnect(struct pw_filter *filter); /** add a port to the filter, returns user data of port_data_size. */ -void *pw_filter_add_port(struct pw_filter *filter, +void *pw_filter_add_port(struct pw_filter *filter, /**< a \ref pw_filter */ enum pw_direction direction, /**< port direction */ enum pw_filter_port_flags flags, /**< port flags */ size_t port_data_size, /**< allocated and given to the user as port_data */ @@ -193,7 +193,9 @@ int pw_filter_update_properties(struct pw_filter *filter, /** Set the filter in error state */ int pw_filter_set_error(struct pw_filter *filter, /**< a \ref pw_filter */ int res, /**< a result code */ - const char *error, ... /**< an error message */) SPA_PRINTF_FUNC(3, 4); + const char *error, /**< an error message */ + ... + ) SPA_PRINTF_FUNC(3, 4); /** Update params, use NULL port_data for global filter params */ int diff --git a/src/pipewire/global.c b/src/pipewire/global.c index 6a6c7b82d..fd098d1bd 100644 --- a/src/pipewire/global.c +++ b/src/pipewire/global.c @@ -267,6 +267,7 @@ void pw_global_add_listener(struct pw_global *global, * * \param global the global to bind to * \param client the client that binds + * \param permissions the \ref pw_permission * \param version the version * \param id the id of the resource * diff --git a/src/pipewire/global.h b/src/pipewire/global.h index d0edad7bb..a672e75e8 100644 --- a/src/pipewire/global.h +++ b/src/pipewire/global.h @@ -55,7 +55,7 @@ struct pw_global; #include -typedef int (*pw_global_bind_func_t) (void *object, +typedef int (*pw_global_bind_func_t) (void *object, /**< global object, see \ref pw_global_new */ struct pw_impl_client *client, /**< client that binds */ uint32_t permissions, /**< permissions for the bind */ uint32_t version, /**< client interface version */ diff --git a/src/pipewire/impl-module.c b/src/pipewire/impl-module.c index c118ffb82..2262337b4 100644 --- a/src/pipewire/impl-module.c +++ b/src/pipewire/impl-module.c @@ -149,6 +149,7 @@ static const struct pw_global_events global_events = { * \param context a \ref pw_context * \param name name of the module to load * \param args A string with arguments for the module + * \param properties extra global properties * \return A \ref pw_impl_module if the module could be loaded, or NULL on failure. * * \memberof pw_impl_module diff --git a/src/pipewire/impl-module.h b/src/pipewire/impl-module.h index 29ea2265a..09a457fc4 100644 --- a/src/pipewire/impl-module.h +++ b/src/pipewire/impl-module.h @@ -75,9 +75,9 @@ struct pw_impl_module_events { struct pw_impl_module * pw_context_load_module(struct pw_context *context, - const char *name, /**< name of the module */ - const char *args /**< arguments of the module */, - struct pw_properties *properties /**< extra global properties */); + const char *name, + const char *args, + struct pw_properties *properties); /** Get the context of a module */ struct pw_context * pw_impl_module_get_context(struct pw_impl_module *module); diff --git a/src/pipewire/stream.h b/src/pipewire/stream.h index 59d60c482..facd4e9f0 100644 --- a/src/pipewire/stream.h +++ b/src/pipewire/stream.h @@ -315,7 +315,8 @@ int pw_stream_disconnect(struct pw_stream *stream); /** Set the stream in error state */ int pw_stream_set_error(struct pw_stream *stream, /**< a \ref pw_stream */ int res, /**< a result code */ - const char *error, ... /**< an error message */) SPA_PRINTF_FUNC(3, 4); + const char *error, /**< an error message */ + ...) SPA_PRINTF_FUNC(3, 4); /** Complete the negotiation process with result code \a res \memberof pw_stream *