From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com
Subject: [committed] Fix Wformat warnings in htab_report with CC="gcc -m32"
Date: Tue, 01 Jan 2019 00:00:00 -0000 [thread overview]
Message-ID: <20191127183514.GA3835@delia> (raw)
Hi,
Using:
...
$ make CC="gcc -m32"
...
we run into this warning:
...
gcc -m32 -O2 -Wall -W -D_FILE_OFFSET_BITS=64 -DDWZ_VERSION='"0.13"' \
-DFSF_YEARS='"1992-2019"' -DRH_YEARS='"2001-2018"' -DSUSE_YEARS='"2019"' \
-c -o dwz.o /data/dwz/dwz.git/dwz.c
dwz.c: In function 'htab_report':
dwz.c:1256:37: warning: format '%lu' expects argument of type \
'long unsigned int', but argument 3 has type 'size_t {aka unsigned int}' \
[-Wformat=]
fprintf (stderr, " size: %lu\n", size);
~~^
%u
...
Fix this and similar in htab_report by using %zu instead.
Committed to trunk.
Thanks,
- Tom
Fix Wformat warnings in htab_report with CC="gcc -m32"
2019-11-27 Tom de Vries <tdevries@suse.de>
* dwz.c (htab_report): Fix Wformat warnings.
---
dwz.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dwz.c b/dwz.c
index 36b54d8..e26b02e 100644
--- a/dwz.c
+++ b/dwz.c
@@ -1253,15 +1253,15 @@ htab_report (htab_t htab, const char *msg)
if (1)
fprintf (stderr, "htab: %s\n", msg);
if (1)
- fprintf (stderr, " size: %lu\n", size);
+ fprintf (stderr, " size: %zu\n", size);
if (elements > 0 && deleted == 0)
- fprintf (stderr, " elements: %lu, occupancy: %f\n", elements,
+ fprintf (stderr, " elements: %zu, occupancy: %f\n", elements,
occupancy);
if (deleted > 0)
- fprintf (stderr, " elements (incl. deleted): %lu, occupancy: %f\n",
+ fprintf (stderr, " elements (incl. deleted): %zu, occupancy: %f\n",
elements, occupancy);
if (deleted > 0)
- fprintf (stderr, " elements (excl. deleted): %lu, occupancy: %f\n",
+ fprintf (stderr, " elements (excl. deleted): %zu, occupancy: %f\n",
adjusted_elements, adjusted_occupancy);
if (elements > 0)
fprintf (stderr, " searches: %u, collisions: %f\n", searches,
reply other threads:[~2019-11-27 18:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191127183514.GA3835@delia \
--to=tdevries@suse.de \
--cc=dwz@sourceware.org \
--cc=jakub@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).