1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-12 09:58:36 +00:00

Fix a 64-bit warning by casting an int64_t to intmax_t and printing it

with %jd.
This commit is contained in:
Hartmut Brandt 2005-05-24 15:45:11 +00:00
parent 99c2f31565
commit 8ea7e6722b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146577

View File

@ -775,7 +775,8 @@ ArchArchiveTouch(struct arfile *ar, int64_t ts)
* change timestamp, be sure to not NUL-terminated it, but
* to fill with spaces.
*/
snprintf(ar->hdr.ar_date, sizeof(ar->hdr.ar_date), "%lld", ts);
snprintf(ar->hdr.ar_date, sizeof(ar->hdr.ar_date), "%jd",
(intmax_t)ts);
memset(ar->hdr.ar_date + strlen(ar->hdr.ar_date),
' ', sizeof(ar->hdr.ar_date) - strlen(ar->hdr.ar_date));