Thread (4 messages) 4 messages, 4 authors, 2022-11-10

Re: x86: clang: acpi-cpufreq.c:970:24: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]

flat view

From: Nathan Chancellor <nathan@kernel.org>
Date: 2022-11-10 12:46:49
Also in: linux-pm, lkml, llvm

Hi Naresh,

On Thu, Nov 10, 2022 at 04:44:09PM +0530, Naresh Kamboju wrote:
[Please ignore email this if it is already reported]

Kernel build warning noticed on x86_64 with clang toolchain [1].
Build failures noticed from next-20221108 .. next-20221110.

Reported-by: Linux Kernel Functional Testing <redacted>

make --silent --keep-going --jobs=8
O=/home/tuxbuild/.cache/tuxmake/builds/1/build LLVM=1 LLVM_IAS=1
ARCH=x86_64 SRCARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- HOSTCC=clang
CC=clang
drivers/cpufreq/acpi-cpufreq.c:970:24: error: variable 'ret' is
uninitialized when used here [-Werror,-Wuninitialized]
        acpi_cpufreq_online = ret;
                              ^~~
drivers/cpufreq/acpi-cpufreq.c:960:9: note: initialize the variable
'ret' to silence this warning
        int ret;
               ^
                = 0
1 error generated.
Thanks for the report. I noticed this when it came down in next-20221108
and sent a patch for it:

https://lore.kernel.org/20221108170103.3375832-1-nathan@kernel.org/ (local)
https://github.com/ClangBuiltLinux/linux/issues/1757

It just needs to be reviewed and picked up.

Cheers,
Nathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help