summaryrefslogtreecommitdiff
path: root/archive-tar.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-05-07 01:08:19 -0700
committerJunio C Hamano <gitster@pobox.com>2009-05-08 23:57:29 -0700
commit3e1629f5a6c832941cc329c381de8b88ea775cb6 (patch)
treed0d00eb9255ddc472d6beb519ad93c146b627888 /archive-tar.c
parent6207011ae3fe813159e92762e86f33c9bd42cd7f (diff)
downloadgit-3e1629f5a6c832941cc329c381de8b88ea775cb6.tar.gz
archive-tar.c: squelch a type mismatch warning
On some systems, giving a value of type time_t to printf "%lo" that expects an unsigned long would give a type mismatch warning. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'archive-tar.c')
-rw-r--r--archive-tar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archive-tar.c b/archive-tar.c
index ba890ebdec..cee06ce3cb 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -180,7 +180,7 @@ static int write_tar_entry(struct archiver_args *args,
sprintf(header.mode, "%07o", mode & 07777);
sprintf(header.size, "%011lo", S_ISREG(mode) ? size : 0);
- sprintf(header.mtime, "%011lo", args->time);
+ sprintf(header.mtime, "%011lo", (unsigned long) args->time);
sprintf(header.uid, "%07o", 0);
sprintf(header.gid, "%07o", 0);