mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-23 21:37:42 -04:00
Fix compilation warning for Clang C++
This commit is contained in:
parent
dae3e92adc
commit
5e9ecc3ce5
1 changed files with 3 additions and 1 deletions
|
|
@ -158,7 +158,9 @@ SPA_API_JSON_UTILS int spa_json_object_find(struct spa_json *iter, const char *k
|
||||||
{
|
{
|
||||||
struct spa_json obj = SPA_JSON_SAVE(iter);
|
struct spa_json obj = SPA_JSON_SAVE(iter);
|
||||||
int res, len = strlen(key) + 3;
|
int res, len = strlen(key) + 3;
|
||||||
char k[len];
|
char *k = (char *)alloca(len);
|
||||||
|
if (!k)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
while ((res = spa_json_object_next(&obj, k, len, value)) > 0)
|
while ((res = spa_json_object_next(&obj, k, len, value)) > 0)
|
||||||
if (spa_streq(k, key))
|
if (spa_streq(k, key))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue