From: guenther Date: Sun, 10 Aug 2014 03:25:39 +0000 (+0000) Subject: Format time_t with %lld after casting to long long X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f3d2a372a924371acc2cba30d1ef1c71908d2fe8;p=openbsd Format time_t with %lld after casting to long long --- diff --git a/gnu/usr.bin/binutils/bfd/archive.c b/gnu/usr.bin/binutils/bfd/archive.c index 6c8397c71bb..c440bb38c54 100644 --- a/gnu/usr.bin/binutils/bfd/archive.c +++ b/gnu/usr.bin/binutils/bfd/archive.c @@ -1937,7 +1937,7 @@ bsd_write_armap (bfd *arch, bfd_ardata (arch)->armap_timestamp = statbuf.st_mtime + ARMAP_TIME_OFFSET; bfd_ardata (arch)->armap_datepos = (SARMAG + offsetof (struct ar_hdr, ar_date[0])); - sprintf (hdr.ar_date, "%ld", bfd_ardata (arch)->armap_timestamp); + sprintf (hdr.ar_date, "%lld", (long long)bfd_ardata (arch)->armap_timestamp); sprintf (hdr.ar_uid, "%ld", (long) getuid ()); sprintf (hdr.ar_gid, "%ld", (long) getgid ()); sprintf (hdr.ar_size, "%-10d", (int) mapsize); @@ -2030,7 +2030,7 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch) /* Prepare an ASCII version suitable for writing. */ memset (hdr.ar_date, 0, sizeof (hdr.ar_date)); - sprintf (hdr.ar_date, "%ld", bfd_ardata (arch)->armap_timestamp); + sprintf (hdr.ar_date, "%lld", (long long)bfd_ardata (arch)->armap_timestamp); for (i = 0; i < sizeof (hdr.ar_date); i++) if (hdr.ar_date[i] == '\0') (hdr.ar_date)[i] = ' '; diff --git a/gnu/usr.bin/binutils/bfd/som.c b/gnu/usr.bin/binutils/bfd/som.c index 90662575bbd..2edce232253 100644 --- a/gnu/usr.bin/binutils/bfd/som.c +++ b/gnu/usr.bin/binutils/bfd/som.c @@ -6249,7 +6249,7 @@ som_write_armap (abfd, elength, map, orl_count, stridx) lst.checksum ^= *p++; sprintf (hdr.ar_name, "/ "); - sprintf (hdr.ar_date, "%ld", bfd_ardata (abfd)->armap_timestamp); + sprintf (hdr.ar_date, "%lld", (long long)bfd_ardata (abfd)->armap_timestamp); sprintf (hdr.ar_uid, "%ld", (long) getuid ()); sprintf (hdr.ar_gid, "%ld", (long) getgid ()); sprintf (hdr.ar_mode, "%-8o", (unsigned int) statbuf.st_mode);