summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7f733de)
raw | patch | inline | side by side (parent: 7f733de)
author | Benjamin Kramer <benny.kra@googlemail.com> | |
Fri, 13 Mar 2009 12:51:33 +0000 (13:51 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 14 Mar 2009 20:36:34 +0000 (13:36 -0700) |
These variables were always overwritten or the assigned
value was unused:
builtin-diff-tree.c::cmd_diff_tree(): nr_sha1
builtin-for-each-ref.c::opt_parse_sort(): sort_tail
builtin-mailinfo.c::decode_header_bq(): in
builtin-shortlog.c::insert_one_record(): len
connect.c::git_connect(): path
imap-send.c::v_issue_imap_cmd(): n
pretty.c::pp_user_info(): filler
remote::parse_refspec_internal(): llen
Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
value was unused:
builtin-diff-tree.c::cmd_diff_tree(): nr_sha1
builtin-for-each-ref.c::opt_parse_sort(): sort_tail
builtin-mailinfo.c::decode_header_bq(): in
builtin-shortlog.c::insert_one_record(): len
connect.c::git_connect(): path
imap-send.c::v_issue_imap_cmd(): n
pretty.c::pp_user_info(): filler
remote::parse_refspec_internal(): llen
Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-diff-tree.c | patch | blob | history | |
builtin-for-each-ref.c | patch | blob | history | |
builtin-mailinfo.c | patch | blob | history | |
builtin-shortlog.c | patch | blob | history | |
connect.c | patch | blob | history | |
imap-send.c | patch | blob | history | |
pretty.c | patch | blob | history | |
remote.c | patch | blob | history |
diff --git a/builtin-diff-tree.c b/builtin-diff-tree.c
index 8ecefd4f0f99117534deb9ca7d4446ade5c00223..79cedb72c44dca3edf400d86e401a93531b54407 100644 (file)
--- a/builtin-diff-tree.c
+++ b/builtin-diff-tree.c
init_revisions(opt, prefix);
git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
- nr_sha1 = 0;
opt->abbrev = 0;
opt->diff = 1;
argc = setup_revisions(argc, argv, opt, NULL);
diff --git a/builtin-for-each-ref.c b/builtin-for-each-ref.c
index e46b7adc9719e147536398e8e365d6d3e65a4ba7..5cbb4b081d63b52393a5f85716ba6961a18fa59e 100644 (file)
--- a/builtin-for-each-ref.c
+++ b/builtin-for-each-ref.c
return -1;
*sort_tail = s = xcalloc(1, sizeof(*s));
- sort_tail = &s->next;
if (*arg == '-') {
s->reverse = 1;
diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index 2789ccdf7dd43a1170a1ca28a3e4d4802422e719..1eeeb4de6d0d54e3fd753b7f057351094e10a24e 100644 (file)
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
*/
strbuf_add(&outbuf, in, ep - in);
}
- in = ep;
}
/* E.g.
* ep : "=?iso-2022-jp?B?GyR...?= foo"
diff --git a/builtin-shortlog.c b/builtin-shortlog.c
index badd9120388569c79b137f679505b495cc1dbbe9..b28091b4455db15e80841f2779ce0686d4f18826 100644 (file)
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
}
while (*oneline && isspace(*oneline) && *oneline != '\n')
oneline++;
- len = eol - oneline;
format_subject(&subject, oneline, " ");
buffer = strbuf_detach(&subject, NULL);
diff --git a/connect.c b/connect.c
index 0a35cc1b25c22256845acffb35828cfa44316892..7636bf976e78a6622281501af2dcc0135781f60a 100644 (file)
--- a/connect.c
+++ b/connect.c
const char *prog, int flags)
{
char *url = xstrdup(url_orig);
- char *host, *path = url;
+ char *host, *path;
char *end;
int c;
struct child_process *conn;
diff --git a/imap-send.c b/imap-send.c
index cb518eb613fdce7482a243ad9075df64ab1a4321..8154cb2116da9257ecf286c46f77fc1ed2a62afc 100644 (file)
--- a/imap-send.c
+++ b/imap-send.c
n = socket_write(&imap->buf.sock, cmd->cb.data, cmd->cb.dlen);
free(cmd->cb.data);
if (n != cmd->cb.dlen ||
- (n = socket_write(&imap->buf.sock, "\r\n", 2)) != 2) {
+ socket_write(&imap->buf.sock, "\r\n", 2) != 2) {
free(cmd->cmd);
free(cmd);
return NULL;
diff --git a/pretty.c b/pretty.c
index c0184080998734450b250aa7dc72c427e1ecac8a..efa70245f19ef3493cd701ea20505203a466d65e 100644 (file)
--- a/pretty.c
+++ b/pretty.c
int namelen;
unsigned long time;
int tz;
- const char *filler = " ";
if (fmt == CMIT_FMT_ONELINE)
return;
while (line < name_tail && isspace(name_tail[-1]))
name_tail--;
display_name_length = name_tail - line;
- filler = "";
strbuf_addstr(sb, "From: ");
add_rfc2047(sb, line, display_name_length, encoding);
strbuf_add(sb, name_tail, namelen - display_name_length);
} else {
strbuf_addf(sb, "%s: %.*s%.*s\n", what,
(fmt == CMIT_FMT_FULLER) ? 4 : 0,
- filler, namelen, line);
+ " ", namelen, line);
}
switch (fmt) {
case CMIT_FMT_MEDIUM:
diff --git a/remote.c b/remote.c
index d7079c6dd871dc1b482d347d013438fe30cc0908..7efaa023b985745b5555e35f8d3a8169870571bd 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -495,7 +495,7 @@ static struct refspec *parse_refspec_internal(int nr_refspec, const char **refsp
int is_glob;
const char *lhs, *rhs;
- llen = is_glob = 0;
+ is_glob = 0;
lhs = refspec[i];
if (*lhs == '+') {