summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0b868e0)
raw | patch | inline | side by side (parent: 0b868e0)
author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 6 Feb 2007 05:26:49 +0000 (00:26 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 6 Feb 2007 05:26:49 +0000 (00:26 -0500) |
Junio noticed these warnings/errors in fast-import when compiling
with `-Werror -ansi -pedantic`. A few changes are to reduce compiler
warnings, while one (in cmd_merge) is a bug fix.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
with `-Werror -ansi -pedantic`. A few changes are to reduce compiler
warnings, while one (in cmd_merge) is a bug fix.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c | patch | blob | history |
diff --git a/fast-import.c b/fast-import.c
index c0ecd08dc1c4c5daf3098491012e49814f10d8f0..0f485c7828ce80e4f42f80d16fcb5b59fd3421d8 100644 (file)
--- a/fast-import.c
+++ b/fast-import.c
const char *p = command_buf.buf + 2;
char *p_uq;
const char *endp;
- struct object_entry *oe;
+ struct object_entry *oe = oe;
unsigned char sha1[20];
uint16_t mode, inline_data = 0;
char type[20];
static struct hash_list* cmd_merge(unsigned int *count)
{
- struct hash_list *list = NULL, *n, *e;
+ struct hash_list *list = NULL, *n, *e = e;
const char *from;
struct branch *s;
else
list = n;
e = n;
- *count++;
+ (*count)++;
read_next_command();
}
return list;
if (s) {
hashcpy(sha1, s->sha1);
} else if (*from == ':') {
+ struct object_entry *oe;
from_mark = strtoumax(from + 1, NULL, 10);
- struct object_entry *oe = find_mark(from_mark);
+ oe = find_mark(from_mark);
if (oe->type != OBJ_COMMIT)
die("Mark :%ju not a commit", from_mark);
hashcpy(sha1, oe->sha1);