Skip to content

Commit

Permalink
archive-tar.c: squelch a type mismatch warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed May 9, 2009
1 parent 6207011 commit 3e1629f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion archive-tar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3e1629f

Please sign in to comment.