Messages in this thread | | | Date | Wed, 18 Jul 2018 11:24:44 -0400 | From | "Theodore Y. Ts'o" <> | 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@MakeLinux.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
| |