aboutsummaryrefslogtreecommitdiff
path: root/builtin-fast-export.c
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2008-07-03 16:52:09 +0100
committerJunio C Hamano <gitster@pobox.com>2008-07-05 17:26:29 -0700
commit6e1c23442a0315ad440bb8457703dcf1ad943b96 (patch)
tree029bfdb329dfdaeb8a85787c6548fbf06d191b78 /builtin-fast-export.c
parentdb5d6666afb9f315f9c9ac74a5d638f07cf9cbe0 (diff)
downloadgit-6e1c23442a0315ad440bb8457703dcf1ad943b96.tar.gz
git-6e1c23442a0315ad440bb8457703dcf1ad943b96.tar.xz
Fix some warnings (on cygwin) to allow -Werror
When printing valuds of type uint32_t, we should use PRIu32, and should not assume that it is unsigned int. On 32-bit platforms, it could be defined as unsigned long. The same caution applies to ntohl(). Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-fast-export.c')
-rw-r--r--builtin-fast-export.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index 170b82e6e..75132bacf 100644
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -116,7 +116,7 @@ static void handle_object(const unsigned char *sha1)
mark_next_object(object);
- printf("blob\nmark :%d\ndata %lu\n", last_idnum, size);
+ printf("blob\nmark :%"PRIu32"\ndata %lu\n", last_idnum, size);
if (size && fwrite(buf, size, 1, stdout) != 1)
die ("Could not write blob %s", sha1_to_hex(sha1));
printf("\n");
@@ -204,7 +204,7 @@ static void handle_commit(struct commit *commit, struct rev_info *rev)
reencoded = reencode_string(message, "UTF-8", encoding);
if (!commit->parents)
printf("reset %s\n", (const char*)commit->util);
- printf("commit %s\nmark :%d\n%.*s\n%.*s\ndata %u\n%s",
+ printf("commit %s\nmark :%"PRIu32"\n%.*s\n%.*s\ndata %u\n%s",
(const char *)commit->util, last_idnum,
(int)(author_end - author), author,
(int)(committer_end - committer), committer,