mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
spa: bluez: fix -Walloc-size
GCC 14 introduces a new -Walloc-size included in -Wextra which gives: ``` ./pipewire-0.3.84/spa/plugins/bluez5/codec-loader.c:176:14: warning: allocation of insufficient size ‘1’ for type ‘struct impl’ with size ‘1032’ [-Walloc-size] ``` The calloc prototype is: ``` void *calloc(size_t nmemb, size_t size); ``` So, just swap the number of members and size arguments to match the prototype, as we're initialising 1 struct of size `sizeof(struct impl)`. GCC then sees we're not doing anything wrong. Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
parent
33db334765
commit
0e35750fde
1 changed files with 1 additions and 1 deletions
|
|
@ -173,7 +173,7 @@ const struct media_codec * const *load_media_codecs(struct spa_plugin_loader *lo
|
|||
#undef MEDIA_CODEC_FACTORY_LIB
|
||||
};
|
||||
|
||||
impl = calloc(sizeof(struct impl), 1);
|
||||
impl = calloc(1, sizeof(struct impl));
|
||||
if (impl == NULL)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue