mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -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
|
|
@ -458,22 +458,22 @@ static int port_get_format(struct spa_node *node,
|
|||
|
||||
spa_pod_builder_add(builder,
|
||||
"I", port->current_format.media_type,
|
||||
"I", port->current_format.media_subtype, 0);
|
||||
"I", port->current_format.media_subtype, NULL);
|
||||
|
||||
if (port->current_format.media_subtype == t->media_subtype.raw) {
|
||||
spa_pod_builder_add(builder,
|
||||
":", t->format_video.format, "I", port->current_format.info.raw.format,
|
||||
":", t->format_video.size, "R", &port->current_format.info.raw.size,
|
||||
":", t->format_video.framerate, "F", &port->current_format.info.raw.framerate, 0);
|
||||
":", t->format_video.framerate, "F", &port->current_format.info.raw.framerate, NULL);
|
||||
} else if (port->current_format.media_subtype == t->media_subtype_video.mjpg ||
|
||||
port->current_format.media_subtype == t->media_subtype_video.jpeg) {
|
||||
spa_pod_builder_add(builder,
|
||||
":", t->format_video.size, "R", &port->current_format.info.mjpg.size,
|
||||
":", t->format_video.framerate, "F", &port->current_format.info.mjpg.framerate, 0);
|
||||
":", t->format_video.framerate, "F", &port->current_format.info.mjpg.framerate, NULL);
|
||||
} else if (port->current_format.media_subtype == t->media_subtype_video.h264) {
|
||||
spa_pod_builder_add(builder,
|
||||
":", t->format_video.size, "R", &port->current_format.info.h264.size,
|
||||
":", t->format_video.framerate, "F", &port->current_format.info.h264.framerate, 0);
|
||||
":", t->format_video.framerate, "F", &port->current_format.info.h264.framerate, NULL);
|
||||
} else
|
||||
return -EIO;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue