* [PATCH] archive-tar.c: squelch a type mismatch warning
@ 2009-05-07 8:08 Junio C Hamano
0 siblings, 0 replies; only message in thread
From: Junio C Hamano @ 2009-05-07 8:08 UTC (permalink / raw)
To: git; +Cc: René Scharfe, Jeff King
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>
---
* A fallout from my foray into FreeBSD (7.2) running on Linux kvm. I was
a bit surprised to find that there only was this one, without saying
anything to NoThanks.
archive-tar.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/archive-tar.c b/archive-tar.c
index ba890eb..cee06ce 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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-05-07 8:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-07 8:08 [PATCH] archive-tar.c: squelch a type mismatch warning Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).