Re: [PATCH] powerpc: Avoid clang uninitialized warning in __get_user_size_allowed
From: Michael Ellerman
Date: Thu Apr 29 2021 - 10:02:50 EST
On Mon, 26 Apr 2021 13:35:18 -0700, Nathan Chancellor wrote:
> Commit 9975f852ce1b ("powerpc/uaccess: Remove calls to __get_user_bad()
> and __put_user_bad()") switch to BUILD_BUG() in the default case, which
> leaves x uninitialized. This will not be an issue because the build will
> be broken in that case but clang does static analysis before it realizes
> the default case will be done so it warns about x being uninitialized
> (trimmed for brevity):
>
> [...]
Applied to powerpc/next.
[1/1] powerpc: Avoid clang uninitialized warning in __get_user_size_allowed
https://git.kernel.org/powerpc/c/f9cd5f91a897ea0c45d0059ceeb091cee78c6ebe
cheers