[alsa-devel] Missing return check of of_property_read_*()

Takashi Iwai tiwai at suse.de
Wed Sep 9 17:01:51 CEST 2015


On Wed, 09 Sep 2015 16:51:58 +0200,
Mark Brown wrote:
> 
> On Wed, Sep 09, 2015 at 04:40:36PM +0200, Takashi Iwai wrote:
> 
> > I hoped that I wouldn't need to write this kind of post, but since
> > nothing happened so far, so here we go:
> 
> Could you be more specific about nothing happening here...

A wonderful gift such like a devoted maintainer/developer already
fixing these bugs magically :)

> > The following compile warnings are present for quite some time.  They
> > are due to the lack of return check from of_property_read*().
> 
> > sound/soc/codecs/cs35l32.c: In function ‘cs35l32_i2c_probe’:
> > sound/soc/codecs/cs35l32.c:278:2: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> >   switch (val) {
> >   ^
> > sound/soc/codecs/cs35l32.c:272:15: note: ‘val’ was declared here
> >   unsigned int val;
> >                ^
> 
> How are you generating these - what compiler and config?  None of the
> build bots are reporting any of the warnings you have here.

Then maybe this can be seen since gcc 5.x.  A good progress of gcc.
I've seen this since the beginning of merge for cs35l32.c (and I
reported this already at merging the branch).

There is nothing special in config or compiler option, just use the
normal x86-64 build with CONFIG_COMPILE_TEST.  I'm using gcc-5.1.1 for
now.


Takashi


More information about the Alsa-devel mailing list