[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160927070837.GS13620@mwanda>
Date: Tue, 27 Sep 2016 10:08:37 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc: SF Markus Elfring <elfring@...rs.sourceforge.net>,
gigaset307x-common@...ts.sourceforge.net, netdev@...r.kernel.org,
Karsten Keil <isdn@...ux-pingi.de>,
Paul Bolle <pebolle@...cali.nl>,
LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH 5/5] ISDN-Gigaset: Enclose two expressions for the sizeof
operator by parentheses
On Mon, Sep 26, 2016 at 08:38:14PM +0300, Sergei Shtylyov wrote:
> >@@ -53,7 +53,7 @@ void gigaset_dbg_buffer(enum debuglevel level, const unsigned char *msg,
> > {
> > unsigned char outbuf[80];
> > unsigned char c;
> >- size_t space = sizeof outbuf - 1;
> >+ size_t space = sizeof(outbuf - 1);
>
> What?! Does that compile?
>
> [...]
It prints a Smatch warning. Smatch ignores these if they happen inside
a macro where you pass a pointer and it takes the sizeof() the argument.
regards,
dan carpenter
Powered by blists - more mailing lists