Util-Linux package development
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Karel Zak <kzak@redhat.com>
Cc: kerolasa@gmail.com, util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH 0/7] pull: make smatch scan output easy to digest
Date: Fri, 24 Feb 2017 03:37:34 +0300	[thread overview]
Message-ID: <20170223153049.GC4133@mwanda> (raw)
In-Reply-To: <20170221095012.txqxcblrqkmoxktw@ws.net.home>

On Tue, Feb 21, 2017 at 10:50:12AM +0100, Karel Zak wrote:
> On Mon, Feb 20, 2017 at 10:12:06PM +0000, Sami Kerola wrote:
> > On 20 February 2017 at 12:14, Karel Zak <kzak@redhat.com> wrote:
> > > Merged, but except:
> > >
> > > On Mon, Feb 13, 2017 at 10:06:34PM +0000, Sami Kerola wrote:
> > >>   misc: unify function declarations [smatch scan]
> > >
> > > I agree that some unification would be nice, but don't like
> > >
> > >    static __attribute__((__noreturn__)) __attribute__((__format__(printf, 1, 2)))
> > >           void log_err(const char *fmt, ...);
> > >
> > > it would be better to keep all the attributes after declaration:
> > >
> > >    static void log_err(const char *fmt, ...)
> > >                     __attribute__((__noreturn__))
> > >                     __attribute__((__format__(printf, 1, 2)));
> > >
> > > it means new line for each attribute. IMHO it's more readable and you
> > > don't have to search for the function name, etc.
> > 
> > Hi Karel,
> > 
> > That's fair enough, and truth is the patch did not fix many warnings so
> > I am sure we can live with them.
> > 
> > What comes to moving attributes at end of the declaration that does
> > not please smatch.
> > 
> > lib/exec_shell.c:33:1: error: attributes should be specified before
> > the declarator in a function definition
> >  void exec_shell(void)
> 
> Report it as smatch bug. It's pretty common that function attributes
> are defined after declaration. CC: Dan.
> 

This is a Sparse warning, not a Smatch warning.  It shouldn't show up
when you do a `make checksmatch` so I'm confused by that.  Anyway,
could you email linux-sparse@vger.kernel.org?

regards,
dan carpenter

  reply	other threads:[~2017-02-24  0:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-13 22:06 [PATCH 0/7] pull: make smatch scan output easy to digest Sami Kerola
2017-02-13 22:06 ` [PATCH 1/7] cfdisk: avoid use of VLA in combination with sizeof() [smatch scan] Sami Kerola
2017-02-13 22:06 ` Sami Kerola
2017-02-13 22:06 ` [PATCH 3/7] misc: add static keyword to where needed " Sami Kerola
2017-02-13 22:06 ` [PATCH 4/7] misc: unify function declarations " Sami Kerola
2017-02-13 22:06 ` [PATCH 5/7] lib/idcache: add void to function declaration " Sami Kerola
2017-02-13 22:06 ` [PATCH 6/7] libblkid: declare across file variables in blkidP.h " Sami Kerola
2017-02-13 22:06 ` [PATCH 7/7] findmnt: fix couple memory leaks [cppcheck] Sami Kerola
2017-02-20 12:14 ` [PATCH 0/7] pull: make smatch scan output easy to digest Karel Zak
2017-02-20 22:12   ` Sami Kerola
2017-02-21  9:50     ` Karel Zak
2017-02-24  0:37       ` Dan Carpenter [this message]
2017-02-25 17:32         ` Sami Kerola
2017-02-25 20:09           ` Dan Carpenter
2017-02-26  4:07           ` Luc Van Oostenryck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170223153049.GC4133@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kerolasa@gmail.com \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox