Skip to contentSkip to conversation

alsa-lib fails test with clang-16

DISCUSSION GitHub issues - opened 1 participant 1 message May 26, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

alsa-project/alsa-lib issue #323 was opened from fsvm88:

Hello,

While building is fine, testing alsa-lib on Gentoo fails since clang-16, due to clang-16 defaulting to c99.

The problem is at alsa-lib-1.2.8/test/oldapi.c, in the typedef declaration, which leads to the following error:

```
alsa-lib-1.2.8/test/oldapi.c:40:6: error: incompatible function pointer types assigning to 'myfcn *' (aka 'void (*)(void *)') from 'int (*)(const snd_pcm_hw_params_t *)' (aka 'int (*)(const struct _snd_pcm_hw_params *)') [-Werror,-Wincompatible-func
        fcn = &snd_pcm_hw_params_get_access;
            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

[This is the Gentoo bug with all the information](https://bugs.gentoo.org/885551)

[I have created a patch based on the compiler's suggestion](https://885551.bugs.gentoo.org/attachment.cgi?id=861055), but I'm not sure if it's the right way to solve this.

Issue URL : https://github.com/alsa-project/alsa-lib/issues/323
Repository URL: https://github.com/alsa-project/alsa-lib