lkml.org 
[lkml]   [2017]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] ALSA: mips: avoid potential uninitialized variable use
On Mon, 16 Jan 2017 14:27:57 +0100,
Arnd Bergmann wrote:
>
> MIPS allmodconfig results in this warning:
>
> sound/mips/hal2.c: In function 'hal2_gain_get':
> sound/mips/hal2.c:224:35: error: 'r' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> sound/mips/hal2.c:223:35: error: 'l' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> sound/mips/hal2.c: In function 'hal2_gain_put':
> sound/mips/hal2.c:260:13: error: 'new' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> sound/mips/hal2.c:260:13: error: 'old' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>
> Returning an error for all unexpected cases shuts up the warning
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v3: actually send the correct patch, sorry for the mixup
> v2: return an error instead trying to handle gracefully

Thanks, applied now.


Takashi

\
 
 \ /
  Last update: 2017-01-16 14:35    [W:0.171 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site