summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c2e86ad)
raw | patch | inline | side by side (parent: c2e86ad)
author | Johannes Schindelin <johannes.schindelin@gmx.de> | |
Tue, 22 Mar 2011 12:50:08 +0000 (13:50 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 22 Mar 2011 18:43:27 +0000 (11:43 -0700) |
Noticed by gcc 4.6.0.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fsck.c | patch | blob | history | |
builtin/remote-ext.c | patch | blob | history | |
diff.c | patch | blob | history | |
reachable.c | patch | blob | history | |
test-subprocess.c | patch | blob | history | |
transport-helper.c | patch | blob | history | |
tree-diff.c | patch | blob | history |
diff --git a/builtin/fsck.c b/builtin/fsck.c
index 795aba087fe9c6ce0e644526d662a561b7f13f31..5ae0366bc8cfe52f226c2af151a66d39b9df02aa 100644 (file)
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
int result = 0;
while (pending.nr) {
struct object_array_entry *entry;
- struct object *obj, *parent;
+ struct object *obj;
entry = pending.objects + --pending.nr;
obj = entry->item;
- parent = (struct object *) entry->name;
result |= traverse_one_object(obj);
}
return !!result;
diff --git a/builtin/remote-ext.c b/builtin/remote-ext.c
index 155e609d68ae81a94128d8d6588dc54463c36ef2..692c834d9dd48615e42b67e3924c64e3397ad903 100644 (file)
--- a/builtin/remote-ext.c
+++ b/builtin/remote-ext.c
size_t rpos = 0;
int escape = 0;
char special = 0;
- size_t pslen = 0;
- size_t pSlen = 0;
size_t psoff = 0;
struct strbuf ret = STRBUF_INIT;
/* Calculate prefix length for \s and lengths for \s and \S */
if (!strncmp(service, "git-", 4))
psoff = 4;
- pSlen = strlen(service);
- pslen = pSlen - psoff;
/* Pass the service to command. */
setenv("GIT_EXT_SERVICE", service, 1);
index 9b3eb9938f8cf9f81cac2b9e79da34e1e02e727c..9fa841010cc21bebc464926b15232b2aace0f5ba 100644 (file)
--- a/diff.c
+++ b/diff.c
uintmax_t max_change = 0, max_len = 0;
int total_files = data->nr;
int width, name_width;
- const char *reset, *set, *add_c, *del_c;
+ const char *reset, *add_c, *del_c;
const char *line_prefix = "";
struct strbuf *msg = NULL;
/* Find the longest filename and max number of changes */
reset = diff_get_color_opt(options, DIFF_RESET);
- set = diff_get_color_opt(options, DIFF_PLAIN);
add_c = diff_get_color_opt(options, DIFF_FILE_NEW);
del_c = diff_get_color_opt(options, DIFF_FILE_OLD);
diff --git a/reachable.c b/reachable.c
index a03fabf060081e9fa5e0d753cd0d9cf4bca5062e..3fc6b1d320faad3a528db016a0d800ff1bdde4f0 100644 (file)
--- a/reachable.c
+++ b/reachable.c
static void process_tag(struct tag *tag, struct object_array *p, const char *name)
{
struct object *obj = &tag->object;
- struct name_path me;
if (obj->flags & SEEN)
return;
obj->flags |= SEEN;
- me.up = NULL;
- me.elem = "tag:/";
- me.elem_len = 5;
-
if (parse_tag(tag) < 0)
die("bad tag object %s", sha1_to_hex(obj->sha1));
if (tag->tagged)
diff --git a/test-subprocess.c b/test-subprocess.c
index 667d3e5079bf06d540b214cd6f8e67922f141a02..8926bc52a9a6e2a16924664372a8af3ee2ed3136 100644 (file)
--- a/test-subprocess.c
+++ b/test-subprocess.c
int main(int argc, char **argv)
{
- const char *prefix;
struct child_process cp;
int nogit = 0;
- prefix = setup_git_directory_gently(&nogit);
+ setup_git_directory_gently(&nogit);
if (nogit)
die("No git repo found");
if (!strcmp(argv[1], "--setup-work-tree")) {
diff --git a/transport-helper.c b/transport-helper.c
index 5846b55875f6e568711b2f90726bb6608aaf4e73..660147f9e96be7b69379a9040c4220c141c7be4c 100644 (file)
--- a/transport-helper.c
+++ b/transport-helper.c
int mirror = flags & TRANSPORT_PUSH_MIRROR;
struct helper_data *data = transport->data;
struct strbuf buf = STRBUF_INIT;
- struct child_process *helper;
struct ref *ref;
- helper = get_helper(transport);
+ get_helper(transport);
if (!data->push)
return 1;
diff --git a/tree-diff.c b/tree-diff.c
index 3954281f509bbed9a9b095ed92d24b67275fed82..76f83fcc27e50b12ddbc8f72badd8d29f5b4230d 100644 (file)
--- a/tree-diff.c
+++ b/tree-diff.c
const unsigned char *sha1, *sha2;
int cmp, pathlen1, pathlen2;
int old_baselen = base->len;
- int retval = 0;
sha1 = tree_entry_extract(t1, &path1, &mode1);
sha2 = tree_entry_extract(t2, &path2, &mode2);
sha1, sha2, base->buf, 0, 0);
}
strbuf_addch(base, '/');
- retval = diff_tree_sha1(sha1, sha2, base->buf, opt);
+ diff_tree_sha1(sha1, sha2, base->buf, opt);
} else {
opt->change(opt, mode1, mode2, sha1, sha2, base->buf, 0, 0);
}