summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fcee5a1)
raw | patch | inline | side by side (parent: fcee5a1)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Wed, 7 Feb 2007 11:38:21 +0000 (12:38 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 7 Feb 2007 17:28:23 +0000 (09:28 -0800) |
Not on all platforms are size_t and unsigned long equivalent.
Since I do not know how portable %z is, I play safe, and just
cast the respective variables to unsigned long.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Since I do not know how portable %z is, I play safe, and just
cast the respective variables to unsigned long.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
fast-import.c | patch | blob | history |
diff --git a/fast-import.c b/fast-import.c
index face9bba3c425daf43f6665b2f46a7b7ead890d2..3f4e73f82162f555324667cb32fb4daced0e3482 100644 (file)
--- a/fast-import.c
+++ b/fast-import.c
SHA_CTX c;
z_stream s;
- hdrlen = sprintf((char*)hdr,"%s %lu",type_names[type],datlen) + 1;
+ hdrlen = sprintf((char*)hdr,"%s %lu", type_names[type],
+ (unsigned long)datlen) + 1;
SHA1_Init(&c);
SHA1_Update(&c, hdr, hdrlen);
SHA1_Update(&c, dat, datlen);
while (n < length) {
size_t s = fread(buffer + n, 1, length - n, stdin);
if (!s && feof(stdin))
- die("EOF in data (%lu bytes remaining)", length - n);
+ die("EOF in data (%lu bytes remaining)",
+ (unsigned long)(length - n));
n += s;
}
}
fprintf(stderr, " marks: %10ju (%10ju unique )\n", (((uintmax_t)1) << marks->shift) * 1024, marks_set_count);
fprintf(stderr, " atoms: %10u\n", atom_cnt);
fprintf(stderr, "Memory total: %10ju KiB\n", (total_allocd + alloc_count*sizeof(struct object_entry))/1024);
- fprintf(stderr, " pools: %10lu KiB\n", total_allocd/1024);
+ fprintf(stderr, " pools: %10lu KiB\n", (unsigned long)(total_allocd/1024));
fprintf(stderr, " objects: %10ju KiB\n", (alloc_count*sizeof(struct object_entry))/1024);
fprintf(stderr, "---------------------------------------------------------------------\n");
pack_report();