Re: [PATCH] media: lirc: suppress false positive smatch warning

Sean Young <[email protected]> Thu, 10 Mar 2022 14:49:50 +0000
Newsgroups org.kernel.vger.smatch,org.kernel.vger.linux-media
Message-ID <[email protected]>
On Thu, Mar 10, 2022 at 05:42:30PM +0300, Dan Carpenter wrote:
> On Thu, Mar 10, 2022 at 01:23:50PM +0000, Sean Young wrote:
> > The latest smatch says:
> > 
> > drivers/media/rc/lirc_dev.c:632 lirc_read_mode2() error: uninitialized symbol 'copied'.
> > drivers/media/rc/lirc_dev.c:671 lirc_read_scancode() error: uninitialized symbol 'copied'.
> > 
> > This is a false positive since in all reaching code paths, copied will
> > be set. Work around this by providing a zero initializer for copied.
> > 
> > Cc: Dan Carpenter <[email protected]>
> > Cc: [email protected]
> > Signed-off-by: Sean Young <[email protected]>
> 
> I'm sorry for this.  I can't reproduce this on my system.  I just did a
> push for something unrelated and I don't know what the previous HEAD
> was...

You're right, with the latest HEAD the warning goes away. Great, let's drop
this patch then.

Thanks for a great tool


Sean