From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84222 invoked by alias); 5 Jun 2019 13:13:27 -0000 Mailing-List: contact gdb-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: , Sender: gdb-cvs-owner@sourceware.org List-Subscribe: Sender: gdb-cvs-owner@sourceware.org Received: (qmail 84161 invoked by uid 10018); 5 Jun 2019 13:13:26 -0000 Date: Wed, 05 Jun 2019 13:13:00 -0000 Message-ID: <20190605131326.84160.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Jose E.Marchesi To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb] libctf: eschew %zi format specifier X-Act-Checkin: binutils-gdb X-Git-Author: Nick Alcock X-Git-Refname: refs/heads/master X-Git-Oldrev: 0088ba596bba2e0b94139f1c2c4f5875848edbd6 X-Git-Newrev: 62d8e3b73139b159963025b5568ec1f5051450f0 X-SW-Source: 2019-06/txt/msg00015.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=62d8e3b73139b159963025b5568ec1f5051450f0 commit 62d8e3b73139b159963025b5568ec1f5051450f0 Author: Nick Alcock Date: Wed Jun 5 13:34:36 2019 +0100 libctf: eschew %zi format specifier Too many platforms don't support it, and we can always safely use %lu or %li anyway, because the only uses are in debugging output. libctf/ * ctf-archive.c (ctf_arc_write): Eschew %zi format specifier. (ctf_arc_open_by_offset): Likewise. * ctf-create.c (ctf_add_type): Likewise. Diff: --- libctf/ChangeLog | 6 ++++++ libctf/ctf-archive.c | 7 ++++--- libctf/ctf-create.c | 7 ++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/libctf/ChangeLog b/libctf/ChangeLog index 7fb7231..6b0a425 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,3 +1,9 @@ +2019-06-05 Nick Alcock + + * ctf-archive.c (ctf_arc_write): Eschew %zi format specifier. + (ctf_arc_open_by_offset): Likewise. + * ctf-create.c (ctf_add_type): Likewise. + 2019-06-04 Tom Tromey * ctf-create.c (ctf_add_encoded, ctf_add_slice) diff --git a/libctf/ctf-archive.c b/libctf/ctf-archive.c index 90cd020..2414493 100644 --- a/libctf/ctf-archive.c +++ b/libctf/ctf-archive.c @@ -68,7 +68,8 @@ ctf_arc_write (const char *file, ctf_file_t ** ctf_files, size_t ctf_file_cnt, off_t nameoffs; struct ctf_archive_modent *modent; - ctf_dprintf ("Writing archive %s with %zi files\n", file, ctf_file_cnt); + ctf_dprintf ("Writing archive %s with %lu files\n", file, + (unsigned long) ctf_file_cnt); if ((fd = open (file, O_RDWR | O_CREAT | O_TRUNC | O_CLOEXEC, 0666)) < 0) { @@ -82,7 +83,7 @@ ctf_arc_write (const char *file, ctf_file_t ** ctf_files, size_t ctf_file_cnt, uint64_t's. */ headersz = sizeof (struct ctf_archive) + (ctf_file_cnt * sizeof (uint64_t) * 2); - ctf_dprintf ("headersz is %zi\n", headersz); + ctf_dprintf ("headersz is %lu\n", (unsigned long) headersz); /* From now on we work in two pieces: an mmap()ed region from zero up to the headersz, and a region updated via write() starting after that, containing @@ -510,7 +511,7 @@ ctf_arc_open_by_offset (const struct ctf_archive *arc, ctf_sect_t ctfsect; ctf_file_t *fp; - ctf_dprintf ("ctf_arc_open_by_offset(%zi): opening\n", offset); + ctf_dprintf ("ctf_arc_open_by_offset(%lu): opening\n", (unsigned long) offset); memset (&ctfsect, 0, sizeof (ctf_sect_t)); diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c index 356d512..5bcc36e 100644 --- a/libctf/ctf-create.c +++ b/libctf/ctf-create.c @@ -1822,9 +1822,10 @@ ctf_add_type (ctf_file_t *dst_fp, ctf_file_t *src_fp, ctf_id_t src_type) ctf_type_size (dst_fp, dst_type)) { ctf_dprintf ("Conflict for type %s against ID %lx: " - "union size differs, old %zi, new %zi\n", - name, dst_type, ctf_type_size (src_fp, src_type), - ctf_type_size (dst_fp, dst_type)); + "union size differs, old %li, new %li\n", + name, dst_type, + (long) ctf_type_size (src_fp, src_type), + (long) ctf_type_size (dst_fp, dst_type)); return (ctf_set_errno (dst_fp, ECTF_CONFLICT)); }