* [PATCH] ALSA: make snd_kcontrol_new name a normal string
@ 2020-10-26 16:52 Arnd Bergmann
2020-10-26 17:03 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2020-10-26 16:52 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai
Cc: alsa-devel, Gustavo A. R. Silva, Arnd Bergmann, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
When building with W=2, there are lots of warnings about the
snd_kcontrol_new name field being an array of 'unsigned char'
but initialized to a string:
include/sound/soc.h:93:48: warning: pointer targets in initialization of 'const unsigned char *' from 'char *' differ in signedness [-Wpointer-sign]
Make it a regular 'char *' to avoid flooding the build log with this.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/sound/control.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/sound/control.h b/include/sound/control.h
index e128cff10dfa..77d9fa10812d 100644
--- a/include/sound/control.h
+++ b/include/sound/control.h
@@ -42,7 +42,7 @@ struct snd_kcontrol_new {
snd_ctl_elem_iface_t iface; /* interface identifier */
unsigned int device; /* device/client number */
unsigned int subdevice; /* subdevice (substream) number */
- const unsigned char *name; /* ASCII name of item */
+ const char *name; /* ASCII name of item */
unsigned int index; /* index of item */
unsigned int access; /* access rights */
unsigned int count; /* count of same elements */
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ALSA: make snd_kcontrol_new name a normal string
2020-10-26 16:52 [PATCH] ALSA: make snd_kcontrol_new name a normal string Arnd Bergmann
@ 2020-10-26 17:03 ` Takashi Iwai
2020-10-26 19:03 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2020-10-26 17:03 UTC (permalink / raw)
To: Arnd Bergmann
Cc: alsa-devel, Arnd Bergmann, Takashi Iwai, linux-kernel,
Gustavo A. R. Silva
On Mon, 26 Oct 2020 17:52:18 +0100,
Arnd Bergmann wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> When building with W=2, there are lots of warnings about the
> snd_kcontrol_new name field being an array of 'unsigned char'
> but initialized to a string:
>
> include/sound/soc.h:93:48: warning: pointer targets in initialization of 'const unsigned char *' from 'char *' differ in signedness [-Wpointer-sign]
>
> Make it a regular 'char *' to avoid flooding the build log with this.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
I'm fine to apply this, but I thought we agreed to ignore pointer
signedness intentionally? There are lots of such places and we were
fed up in the past when gcc complained a lot about those...
thanks,
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ALSA: make snd_kcontrol_new name a normal string
2020-10-26 17:03 ` Takashi Iwai
@ 2020-10-26 19:03 ` Arnd Bergmann
2020-10-26 19:29 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2020-10-26 19:03 UTC (permalink / raw)
To: Takashi Iwai
Cc: linux-kernel, ALSA Development Mailing List, Gustavo A. R. Silva,
Takashi Iwai
On Mon, Oct 26, 2020 at 6:03 PM Takashi Iwai <tiwai@suse.de> wrote:
> On Mon, 26 Oct 2020 17:52:18 +0100,
> Arnd Bergmann wrote:
> >
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > When building with W=2, there are lots of warnings about the
> > snd_kcontrol_new name field being an array of 'unsigned char'
> > but initialized to a string:
> >
> > include/sound/soc.h:93:48: warning: pointer targets in initialization of 'const unsigned char *' from 'char *' differ in signedness [-Wpointer-sign]
> >
> > Make it a regular 'char *' to avoid flooding the build log with this.
> >
> > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> I'm fine to apply this, but I thought we agreed to ignore pointer
> signedness intentionally? There are lots of such places and we were
> fed up in the past when gcc complained a lot about those...
I'm only sending fixes for the ones in headers that get included in
a lot of places. There are good reasons for building being able to
build specific drivers or directories with W=2, but it's less helpful
if there are many identical warnings.
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ALSA: make snd_kcontrol_new name a normal string
2020-10-26 19:03 ` Arnd Bergmann
@ 2020-10-26 19:29 ` Takashi Iwai
0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2020-10-26 19:29 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kernel, ALSA Development Mailing List, Gustavo A. R. Silva,
Takashi Iwai
On Mon, 26 Oct 2020 20:03:39 +0100,
Arnd Bergmann wrote:
>
> On Mon, Oct 26, 2020 at 6:03 PM Takashi Iwai <tiwai@suse.de> wrote:
> > On Mon, 26 Oct 2020 17:52:18 +0100,
> > Arnd Bergmann wrote:
> > >
> > > From: Arnd Bergmann <arnd@arndb.de>
> > >
> > > When building with W=2, there are lots of warnings about the
> > > snd_kcontrol_new name field being an array of 'unsigned char'
> > > but initialized to a string:
> > >
> > > include/sound/soc.h:93:48: warning: pointer targets in initialization of 'const unsigned char *' from 'char *' differ in signedness [-Wpointer-sign]
> > >
> > > Make it a regular 'char *' to avoid flooding the build log with this.
> > >
> > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >
> > I'm fine to apply this, but I thought we agreed to ignore pointer
> > signedness intentionally? There are lots of such places and we were
> > fed up in the past when gcc complained a lot about those...
>
> I'm only sending fixes for the ones in headers that get included in
> a lot of places. There are good reasons for building being able to
> build specific drivers or directories with W=2, but it's less helpful
> if there are many identical warnings.
OK, now I applied the patch. Thanks!
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-10-28 8:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 16:52 [PATCH] ALSA: make snd_kcontrol_new name a normal string Arnd Bergmann
2020-10-26 17:03 ` Takashi Iwai
2020-10-26 19:03 ` Arnd Bergmann
2020-10-26 19:29 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).