All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Kramer <benny.kra@googlemail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Remove unused assignments
Date: Sat, 14 Mar 2009 21:57:13 +0100	[thread overview]
Message-ID: <49BC1A29.60503@googlemail.com> (raw)
In-Reply-To: <7v7i2rc0zp.fsf@gitster.siamese.dyndns.org>

Junio C Hamano wrote:
> 
> Thanks.  I eyeballed all of them and they look safe, but this patch made
> me wonder...
> 
> Did you use some dataflow analysis tool to spot these?
> 
> It will never scale if a human has to sanity check output from a
> mechanical process like this patch, especially when the human is already a
> chokepoint of the whole process (i.e. the maintainer).

Yep, they were found with a little help of the clang static analyzer

http://clang.llvm.org/StaticAnalysis.html

It is in early stages of development so it may report false positives and
it chokes on some files. Here is the latest output I have, with my patch
applied:

http://doktorz.mooltied.de/stuff/scan-build-2009-03-13-2/

I've looked briefly at the "Logic Errors" and they all seem to be false
positives. I did not have enough time to look into all the remaining "Dead
Stores" though.

-- Benjamin

      reply	other threads:[~2009-03-14 20:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-13 12:51 [PATCH] Remove unused assignments Benjamin Kramer
2009-03-14 20:18 ` Junio C Hamano
2009-03-14 20:57   ` Benjamin Kramer [this message]

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=49BC1A29.60503@googlemail.com \
    --to=benny.kra@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.