mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-17 07:00:03 -05:00
builder: fix calls to builder_add that are not terminated by NULL
spa_pod_builder_add() is a va_args function that is terminated by a NULL argument. The last argument must be a pointer type, because otherwise checking for a NULL pointer can fail. The __attribute__((__sentinel__)) prints a compiler warning, if the last argument of a call to spa_pod_builder_add() is not a pointer type. Fix all sentinel warnings by replacing all integer type 0 with pointer type NULL in calls to spa_pod_builder_add().
This commit is contained in:
parent
4350bd624f
commit
39c01ba2fe
6 changed files with 32 additions and 31 deletions
|
|
@ -574,7 +574,8 @@ spa_pod_builder_addv(struct spa_pod_builder *builder,
|
|||
return spa_pod_builder_deref(builder, builder->frame[builder->state.depth].ref);
|
||||
}
|
||||
|
||||
static inline void *spa_pod_builder_add(struct spa_pod_builder *builder, const char *format, ...)
|
||||
static inline __attribute__((__sentinel__)) void *
|
||||
spa_pod_builder_add(struct spa_pod_builder *builder, const char *format, ...)
|
||||
{
|
||||
void *res;
|
||||
va_list args;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue