public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs mailing list <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfsprogs: mark some functions as noreturn
Date: Fri, 4 Sep 2009 19:09:04 -0400	[thread overview]
Message-ID: <20090904230904.GA25934@infradead.org> (raw)
In-Reply-To: <4AA19639.6090208@sandeen.net>

On Fri, Sep 04, 2009 at 05:35:37PM -0500, Eric Sandeen wrote:
> Static checkers are a lot less noisy if they know certain
> functions are noreturn.
> 
> Making this change removed about 50 errors from "clang" output.
> (http://clang-analyzer.llvm.org) output.

Not pretty but useful,


Reviewed-by: Christoph Hellwig <hch@lst.de>

> -void	do_abort(char const *, ...);		/* abort, internal error */
> -void	do_error(char const *, ...);		/* abort, system error */
> -void	do_warn(char const *, ...);		/* issue warning */
> -void	do_log(char const *, ...);		/* issue log message */
> +/* abort, internal error */
> +void  __attribute__((noreturn)) do_abort(char const *, ...);
> +/* abort, system error */
> +void  __attribute__((noreturn)) do_error(char const *, ...);
> +/* issue warning */
> +void do_warn(char const *, ...);
> +/* issue log message */
> +void do_log(char const *, ...);

It would be good to add the proper printflike attributes to these to
also get vararg typechecking.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2009-09-04 23:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-04 22:35 [PATCH] xfsprogs: mark some functions as noreturn Eric Sandeen
2009-09-04 23:09 ` Christoph Hellwig [this message]
2009-09-08 14:39 ` [PATCH] xfsprogs: fix up the noreturn annotations Christoph Hellwig
2009-09-09 17:16   ` Eric Sandeen

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=20090904230904.GA25934@infradead.org \
    --to=hch@infradead.org \
    --cc=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.com \
    /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