lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 13 Feb 2024 14:25:03 +0100
From: Takashi Iwai <tiwai@...e.de>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Jaroslav Kysela <perex@...ex.cz>,
	Takashi Iwai <tiwai@...e.com>,
	Arnd Bergmann <arnd@...db.de>,
	Nathan Chancellor <nathan@...nel.org>,
	Nick Desaulniers <ndesaulniers@...gle.com>,
	Bill Wendling <morbo@...gle.com>,
	Justin Stitt <justinstitt@...gle.com>,
	Cedric Bregardis <cedric.bregardis@...e.fr>,
	Jean-Christian Hassler <jhassler@...e.fr>,
	linux-sound@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	llvm@...ts.linux.dev
Subject: Re: [PATCH] ALSA: aw2: avoid casting function pointers

On Tue, 13 Feb 2024 11:13:19 +0100,
Arnd Bergmann wrote:
> 
> From: Arnd Bergmann <arnd@...db.de>
> 
> clang-16 started warning about incompatible function pointers here:
> 
> sound/pci/aw2/aw2-alsa.c:363:11: error: cast from 'void (*)(struct snd_pcm_substream *)' to 'snd_aw2_saa7146_it_cb' (aka 'void (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
>   363 |                                                     (snd_aw2_saa7146_it_cb)
>       |                                                     ^~~~~~~~~~~~~~~~~~~~~~~
>   364 |                                                     snd_pcm_period_elapsed,
>       |                                                     ~~~~~~~~~~~~~~~~~~~~~~
> sound/pci/aw2/aw2-alsa.c:392:10: error: cast from 'void (*)(struct snd_pcm_substream *)' to 'snd_aw2_saa7146_it_cb' (aka 'void (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
>   392 |                                                    (snd_aw2_saa7146_it_cb)
>       |                                                    ^~~~~~~~~~~~~~~~~~~~~~~
>   393 |                                                    snd_pcm_period_elapsed,
>       |                                                    ~~~~~~~~~~~~~~~~~~~~~~
> 
> Add a forward declaration for struct snd_pcm_substrea to allow it to just
> use the correct prototype.
> 
> Fixes: 98f2a97f207a ("[ALSA] Emagic Audiowerk 2 ALSA driver.")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Thanks, applied.


Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ