Re: [RFC PATCH] coccinelle: misc: add uninitialized_var.cocci script

From: Julia Lawall
Date: Sat Aug 29 2020 - 16:07:12 EST




On Sat, 29 Aug 2020, Joe Perches wrote:

> On Sat, 2020-08-29 at 21:36 +0200, Julia Lawall wrote:
> >
> > On Wed, 12 Aug 2020, Denis Efremov wrote:
> >
> > > Commit 63a0895d960a ("compiler: Remove uninitialized_var() macro") and
> > > commit 4b19bec97c88 ("docs: deprecated.rst: Add uninitialized_var()")
> > > removed uninitialized_var() and deprecated it.
> > >
> > > The purpose of this script is to prevent new occurrences of open-coded
> > > variants of uninitialized_var().
>
> > > Cc: Kees Cook <keescook@xxxxxxxxxxxx>
> > > Cc: Gustavo A. R. Silva <gustavoars@xxxxxxxxxx>
> > > Signed-off-by: Denis Efremov <efremov@xxxxxxxxx>
> >
> > Applied, without the commented out part.
> >
> > I only got three warnings, though. Perhaps the others have been fixed?
>
> uninitialized_var does not exist in -next

OK, if it seems better, I can remove it. Out of the threee reported, one
was a completely unnecessary initialization.

julia