Return-Path: Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347931AbiCJOvc (ORCPT ); Thu, 10 Mar 2022 09:51:32 -0500 Date: Thu, 10 Mar 2022 14:49:50 +0000 From: Sean Young Subject: Re: [PATCH] media: lirc: suppress false positive smatch warning Message-ID: References: <20220310132350.78729-1-sean@mess.org> <20220310144230.GI3315@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220310144230.GI3315@kadam> List-ID: To: Dan Carpenter Cc: linux-media@vger.kernel.org, smatch@vger.kernel.org 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 > > Cc: smatch@vger.kernel.org > > Signed-off-by: Sean Young > > 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