[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180718152444.GB30706@thunk.org>
Date: Wed, 18 Jul 2018 11:24:44 -0400
From: "Theodore Y. Ts'o" <tytso@....edu>
To: Constantine Shulyupin <const@...eLinux.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers/char/random.c: fix uninitialized value warning
On Wed, Jul 18, 2018 at 10:11:52AM +0300, Constantine Shulyupin wrote:
> Local variable t should be initialized by arch_get_random_int.
> Actually on failure of arch_get_random_int, value is not used.
> So, just keep the build clean with less warnings.
>
> warning:
> drivers/char/random.c: In function ‘write_pool.constprop’:
> drivers/char/random.c:1912:11: warning: ‘t’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> Signed-off-by: Constantine Shulyupin <const@...eLinux.com>
There was a more significant problem which Arnd pointed out, which is
I had reversed the sense of the test in arch_get_random_int(). I've
since fixed this, and the current random tree is clean of warnings.
- Ted
Powered by blists - more mailing lists