Re: arch/x86/include/asm/string_32.h:182:25: warning: 'val' may be used uninitialized in this function

From: Steven Rostedt
Date: Thu Jan 02 2020 - 18:52:08 EST


On Thu, 2 Jan 2020 03:51:46 +0800
kbuild test robot <lkp@xxxxxxxxx> wrote:

> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 738d2902773e30939a982c8df7a7f94293659810
> commit: 6c3edaf9fd6a3be7fb5bc6931897c24cd3848f84 tracing: Introduce trace event injection
> date: 4 weeks ago
> config: i386-randconfig-a003-20200102 (attached as .config)
> compiler: gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
> reproduce:
> git checkout 6c3edaf9fd6a3be7fb5bc6931897c24cd3848f84
> # save the attached .config to linux build tree
> make ARCH=i386
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@xxxxxxxxx>
>
> Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
> http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

It is a false positive, but it's complex and subtle enough to just set
val to zero and remove the warning.

-- Steve