linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: josh@joshtriplett.org
To: Thomas Graf <tgraf@suug.ch>
Cc: linux-sparse@vger.kernel.org
Subject: Re: [PATCH] sparse: Make -Werror turn warnigns into errors
Date: Wed, 3 Sep 2014 11:59:39 -0700	[thread overview]
Message-ID: <20140903185939.GA24390@cloud> (raw)
In-Reply-To: <ddf8540942f71841dd90c5218da944cebef4a514.1409770383.git.tgraf@suug.ch>

On Wed, Sep 03, 2014 at 08:54:05PM +0200, Thomas Graf wrote:
> Make sparse fail and return an error code if a warning is encountered
> and -Werror is specified or a hard error is found. This allows to use
> sparse in automated build systems to more easily catch new sparse
> warnings.
> 
> Due to sparse now returning non zero on failure, the test cases
> triggering a error have to be adapated to check for the non zero return
> value.
> 
> Also changes cgcc to die if the checker fails.
> 
> Signed-off-by: Thomas Graf <tgraf@suug.ch>

This seems reasonable.  Sparse refrains from showing further warnings
after an error, but this turns warnings into errors, so they'll still
show up.

Not needed for this patch, but would you consider adding
-Werror=specific-warning support too?  (That'll need some careful
thought about the no-warnings-after-error logic, which may or may not
make sense.)

- Josh Triplett

  reply	other threads:[~2014-09-03 18:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03 18:54 [PATCH] sparse: Make -Werror turn warnigns into errors Thomas Graf
2014-09-03 18:59 ` josh [this message]
2014-09-03 19:08   ` Thomas Graf
2014-09-24 12:31     ` Sparse maintainership (was: [PATCH] sparse: Make -Werror turn warnigns into errors) Thomas Graf
2014-09-24 15:05       ` Christopher Li
2014-09-24 15:24 ` [PATCH] sparse: Make -Werror turn warnigns into errors Christopher Li
2014-09-24 15:42   ` Thomas Graf
2014-09-24 23:16     ` Christopher Li
2014-09-25  2:27       ` Christopher Li
2014-09-25  2:46       ` Christopher Li
2014-09-25  8:12         ` Thomas Graf

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=20140903185939.GA24390@cloud \
    --to=josh@joshtriplett.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=tgraf@suug.ch \
    /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;
as well as URLs for NNTP newsgroup(s).