Linux: -Wsometimes-uninitialized in arch/arm64/include/asm/percpu.h

Created on 25 Sep 2018  路  6Comments  路  Source: ClangBuiltLinux/linux

Reported-by: Prasad Sodagudi聽psodagud@quicinc.com psodagud@codeaurora.org

./arch/arm64/include/asm/percpu.h:105:1: warning: variable 'ret' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]

I think that you can initialize ret in the default case
besides calling BUILD_BUG_ON();.

[ARCH] arm64 [BUG] linux [FIXED][LINUX] 4.20

Most helpful comment

All 6 comments

Hmmm how is this warning being triggered? I just did a simple defconfig build for arm64 (which should show it since it's in a super generic header no?) and I didn't see it anywhere. Do I need a full allyesconfig?

I'll cook up a patch shortly and ship it along but I am curious how to get this show up in my build.

allyesconfig. Yes on updating the reporter's email, too. Good catch.

Comes from drivers/staging/erofs in a few files, thanks for the clarification.

Patch sent: https://lore.kernel.org/lkml/[email protected]/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tpimh picture tpimh  路  5Comments

nathanchance picture nathanchance  路  3Comments

nickdesaulniers picture nickdesaulniers  路  5Comments

nickdesaulniers picture nickdesaulniers  路  4Comments

tpgxyz picture tpgxyz  路  4Comments