[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210824194659.6qq3h4uk7ngrgk6a@lion.mk-sys.cz>
Date: Tue, 24 Aug 2021 21:46:59 +0200
From: Michal Kubecek <mkubecek@...e.cz>
To: Jakub Kicinski <kuba@...nel.org>
Cc: andrew@...n.ch, netdev@...r.kernel.org, dcavalca@...com,
filbranden@...com, michel@...com
Subject: Re: [PATCH ethtool 2/3] ethtool: use dummy args[] entry for no-args
case
On Tue, Aug 24, 2021 at 10:43:23AM -0700, Jakub Kicinski wrote:
> On Tue, 24 Aug 2021 19:41:23 +0200 Michal Kubecek wrote:
> > On Fri, Aug 13, 2021 at 10:19:37AM -0700, Jakub Kicinski wrote:
> > > Note that this patch adds a false-positive warning with GCC 11:
> > >
> > > ethtool.c: In function ‘find_option’:
> > > ethtool.c:6082:29: warning: offset ‘1’ outside bounds of constant string [-Warray-bounds]
> > > 6082 | opt += len + 1;
> > > | ~~~~^~~~~~~~~~
> > >
> > > we'll never get to that code if the string is empty.
> >
> > Unless I missed something, an easy workaround should be starting the
> > loop in find_option() from 1 rather than from 0. It would IMHO even make
> > more sense as there is little point comparing the first argument against
> > the dummy args[0] entry.
>
> SGTM, will you commit a patch or should I send one?
I'll commit it.
Michal
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists