lkml.org 
[lkml]   [2023]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf/x86/amd/uncore: fix error codes in amd_uncore_init()

* Dan Carpenter <dan.carpenter@linaro.org> wrote:

> On Fri, Oct 13, 2023 at 09:30:46AM +0200, Ingo Molnar wrote:
>
> > Ugh, why on Earth didn't GCC warn about this? The bad pattern is pretty
> > simple & obvious once pointed out ... compilers should have no trouble
> > realizing that 'ret' is returned uninitialized in some of these control
> > paths. Yet not a peep from the compiler ...
>
> We disabled that warning years ago (5?) because GCC had too many false
> positives.

GCC had some pretty bogus notions about 'possible' uninitialized use that
encouraged some bad code patterns, but in this case there's readily
provable uninitialized use, that a compiler should warn about.

Is it possible to disable just the unreliable, probabilistic part of GCC's
uninitialized variables warnings?

Thanks,

Ingo

\
 
 \ /
  Last update: 2023-10-13 11:07    [W:0.766 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site