Junio C Hamano  committed 3e1629f

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 <>

  • Participants
  • Parent commits 6207011

Comments (0)

Files changed (1)

File archive-tar.c

 	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);