Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
archive-tar.c: squelch a type mismatch warning
author
Junio C Hamano
<gitster@pobox.com>
Thu, 7 May 2009 08:08:19 +0000
(
01:08
-0700)
committer
Junio C Hamano
<gitster@pobox.com>
Sat, 9 May 2009 06:57:29 +0000
(23:57 -0700)
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>
archive-tar.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
6207011
)
diff --git
a/archive-tar.c
b/archive-tar.c
index ba890ebdecd8672aeb32757605c8a2976fa21161..cee06ce3cbc1819008337633ed0753638c423ac5 100644
(file)
--- 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);