From: Giuseppe Scrivano <gscrivano@gnu•org>
To: Reece Dunn <msclrhd@googlemail•com>
Cc: Jeff King <peff@peff•net>,
git@vger•kernel.org,
Johannes Schindelin <Johannes.Schindelin@gmx•de>,
Sverre Rabbelier <srabbelier@gmail•com>
Subject: Re: [PATCH] Remove various dead assignments and dead increments found by the clang static analyzer
Date: Sat, 26 Sep 2009 23:42:33 +0200 [thread overview]
Message-ID: <87bpkxcrhy.fsf@master.homenet> (raw)
In-Reply-To: <3f4fd2640909261420h2588df4cld8dd3e49f9654e9e@mail.gmail.com> (Reece Dunn's message of "Sat, 26 Sep 2009 22:20:18 +0100")
Reece Dunn <msclrhd@googlemail•com> writes:
>> There is exactly one caller, and it doesn't care about the return code
>> for the reasons mentioned above.
>
> Including being called from a script?
I agree, if something goes wrong then it should be reported. The same
applies to the `run_receive_hook' return code that is not checked in
`cmd_receive_pack'.
Considering you want to keep the current source code invariants, and I
don't have any objection to it, probably the only assignment that can be
removed is the following one:
>From f8dd14bf4c3f3e132f6a8e13bf3e2fc575a804b1 Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano <gscrivano@gnu•org>
Date: Sat, 26 Sep 2009 23:23:13 +0200
Subject: [PATCH] Remove a dead assignment found by the clang static analyzer
---
http-fetch.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/http-fetch.c b/http-fetch.c
index e8f44ba..6879904 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -3,7 +3,6 @@
int main(int argc, const char **argv)
{
- const char *prefix;
struct walker *walker;
int commits_on_stdin = 0;
int commits;
@@ -19,7 +18,7 @@ int main(int argc, const char **argv)
int get_verbosely = 0;
int get_recover = 0;
- prefix = setup_git_directory();
+ setup_git_directory();
git_config(git_default_config, NULL);
--
1.6.3.3
next prev parent reply other threads:[~2009-09-26 21:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-26 14:46 [PATCH] Remove various dead assignments and dead increments found by the clang static analyzer Giuseppe Scrivano
2009-09-26 15:58 ` Johannes Schindelin
2009-09-26 18:21 ` Giuseppe Scrivano
2009-09-26 18:34 ` Sverre Rabbelier
2009-09-26 18:46 ` Giuseppe Scrivano
2009-09-26 19:15 ` Giuseppe Scrivano
2009-09-26 19:28 ` René Scharfe
2009-09-26 20:39 ` Johannes Schindelin
2009-09-26 20:46 ` Jeff King
2009-09-26 21:03 ` Reece Dunn
2009-09-26 21:12 ` Jeff King
2009-09-26 21:20 ` Reece Dunn
2009-09-26 21:36 ` Jeff King
2009-09-26 21:46 ` Reece Dunn
2009-09-26 21:42 ` Giuseppe Scrivano [this message]
2009-09-27 0:41 ` Nicolas Pitre
2009-09-27 8:21 ` Giuseppe Scrivano
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=87bpkxcrhy.fsf@master.homenet \
--to=gscrivano@gnu$(echo .)org \
--cc=Johannes.Schindelin@gmx$(echo .)de \
--cc=git@vger$(echo .)kernel.org \
--cc=msclrhd@googlemail$(echo .)com \
--cc=peff@peff$(echo .)net \
--cc=srabbelier@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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