Re: uninitialized variables bugs

Tom Rix
2022-05-08T12:18:09Z

On 5/6/22 2:50 PM, Nathan Chancellor wrote:
> Hi Dan,
>
> On Fri, May 06, 2022 at 12:13:38PM +0300, Dan Carpenter wrote:
>> Ever since commit 78a5255ffb6a ("Stop the ad-hoc games with
>> -Wno-maybe-initialized"), GCC's uninitialized variable warnings have
>> been disabled by default. Now, you have to turn on W=1 or W=2 to see
>> the warnings which nobody except Arnd does.
...
> Clang's static analyzer, which Tom regularly runs, will check variables
> across function boundaries. I am not sure what the false positive rate
> on that check is but it does turn up issues like smatch does.

Clang's static analyzer is pretty go wrt uninitialized variables.

But the issues do not turn up in the report, the show up as errors and
is why

I post a fix for a build break every couple of weeks.

Tom