From: Junio C Hamano Date: Thu, 7 May 2009 08:08:19 +0000 (-0700) Subject: archive-tar.c: squelch a type mismatch warning X-Git-Tag: v1.6.3.1~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3e1629f5a6c832941cc329c381de8b88ea775cb6;p=git.git 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 --- diff --git a/archive-tar.c b/archive-tar.c index ba890ebde..cee06ce3c 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);