[PATCH] -Werror fixes

GCC's format __attribute__ is good for checking errors, especially
with -Wformat=2 parameter. This fixes most of the reported problems
against 2005-08-09 snapshot.
This commit is contained in:
Timo Sirainen
2005-08-09 18:30:22 +03:00
committed by Junio C Hamano
parent 96ad15ae2f
commit 4ec99bf080
9 changed files with 21 additions and 16 deletions

View File

@ -563,7 +563,7 @@ static int find_header(char *line, unsigned long size, int *hdrsize, struct patc
struct fragment dummy;
if (parse_fragment_header(line, len, &dummy) < 0)
continue;
error("patch fragment without header at line %d: %.*s", linenr, len-1, line);
error("patch fragment without header at line %d: %.*s", linenr, (int)len-1, line);
}
if (size < len + 6)
@ -968,7 +968,7 @@ static int apply_fragments(struct buffer_desc *desc, struct patch *patch)
while (frag) {
if (apply_one_fragment(desc, frag) < 0)
return error("patch failed: %s:%d", patch->old_name, frag->oldpos);
return error("patch failed: %s:%ld", patch->old_name, frag->oldpos);
frag = frag->next;
}
return 0;