From: "Niklas Hambüchen" <mail@nh2.me>
To: DJ Delorie <dj@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] malloc_stats(): Fix `unsigned int` overflow
Date: Sat, 30 Oct 2021 02:36:58 +0200 [thread overview]
Message-ID: <a646adce-08a5-6574-457a-a8f860b9d808@nh2.me> (raw)
In-Reply-To: <xn35oja9w2.fsf@greed.delorie.com>
The error:
> malloc.c:5169:48: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
glibc doesn't require C99, so I guess "%zu" is not an option, right?
Since this is just in an `fprintf`, would casting to `(unsigned long long)` and using "%llu" be considered acceptable?
Niklas
next prev parent reply other threads:[~2021-10-30 0:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-29 17:11 Niklas Hambüchen
2021-10-29 19:50 ` DJ Delorie
2021-10-30 0:36 ` Niklas Hambüchen [this message]
2021-10-30 1:39 ` Siddhesh Poyarekar
2021-10-30 6:55 ` Andreas Schwab
2023-11-13 18:27 ` [PATCH v2] " Niklas Hambüchen
2023-11-13 20:25 ` DJ Delorie
2023-11-13 23:10 ` Niklas Hambüchen
2023-11-13 23:23 ` DJ Delorie
2021-11-01 12:34 ` [PATCH] " Adhemerval Zanella
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=a646adce-08a5-6574-457a-a8f860b9d808@nh2.me \
--to=mail@nh2.me \
--cc=dj@redhat.com \
--cc=libc-alpha@sourceware.org \
/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).