Skip to content

Commit 3e1629f

Browse files
committed
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 <[email protected]>
1 parent 6207011 commit 3e1629f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

archive-tar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static int write_tar_entry(struct archiver_args *args,
180180

181181
sprintf(header.mode, "%07o", mode & 07777);
182182
sprintf(header.size, "%011lo", S_ISREG(mode) ? size : 0);
183-
sprintf(header.mtime, "%011lo", args->time);
183+
sprintf(header.mtime, "%011lo", (unsigned long) args->time);
184184

185185
sprintf(header.uid, "%07o", 0);
186186
sprintf(header.gid, "%07o", 0);

0 commit comments

Comments
 (0)