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:	Wed, 25 Mar 2015 11:03:27 +0000
From:	Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
To:	Takashi Iwai <tiwai@...e.de>
Cc:	broonie@...nel.org, alsa-devel@...a-project.org,
	patches@...nsource.wolfsonmicro.com, lgirdwood@...il.com,
	nikesh@...nsource.wolfsonmicro.com, linux-kernel@...r.kernel.org
Subject: Re: [alsa-devel] [PATCH] ASoC: DAPM: Fix build warning

On Wed, Mar 25, 2015 at 11:53:30AM +0100, Takashi Iwai wrote:
> At Wed, 25 Mar 2015 10:13:28 +0000,
> Charles Keepax wrote:
> > 
> > commit c66150824b8a ("ASoC: dapm: add code to configure dai link
> > parameters") introduced the following build warning:
> > 
> > sound/soc/soc-dapm.c: In function 'snd_soc_dapm_new_pcm':
> > sound/soc/soc-dapm.c:3389:4: warning: passing argument 1 of 'snprintf'
> > discards 'const' qualifier from pointer target type
> >     snprintf(w_param_text[count], len,
> > 
> > This patch fixes this by adding a non-const temporary variable to hold
> > the value as it is created before assigning to the entry in
> > w_param_text.
> > 
> > Signed-off-by: Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
> 
> An easier fix would be to replace with devm_kasprintf().  Then you can
> do it all in a single line.
> 
> 	w_param_text[count] = devm_kasprintf(card->dev, GFP_KERNEL,
> 				"Anonymous Configuration %d", count);
> 
> 
> Takashi

Thanks wasn't aware of that one, I will respin.

Thanks,
Charles
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ