From: "Måns Rullgård" <mans@mansr.com>
To: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>,
Pekka Enberg <penberg@kernel.org>,
glommer@parallels.com, js1304@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: signed size_t ?
Date: Tue, 11 Dec 2012 14:49:59 +0000 [thread overview]
Message-ID: <yw1xhans63u0.fsf@unicorn.mansr.com> (raw)
In-Reply-To: <0000013b8a5f57c0-442ea272-5d51-4870-af48-ed948a98b2ef-000000@email.amazonses.com> (Christoph Lameter's message of "Tue, 11 Dec 2012 14:30:02 +0000")
Christoph Lameter <cl@linux.com> writes:
> On Tue, 11 Dec 2012, kbuild test robot wrote:
>
>> mm/slab_common.c: In function 'create_boot_cache':
>> mm/slab_common.c:219:6: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'size_t' [-Wformat]
>
> We already changed that once from %td to %zd so that the size_t works
> correctly.
If the argument is correctly of type size_t, the format should be '%zu'
since size_t is unsigned.
> Does a signed size_t make any sense?
A signed type corresponding to size_t sometimes makes sense and it's
called ssize_t.
--
Måns Rullgård
mans@mansr.com
prev parent reply other threads:[~2012-12-11 14:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <50c71402.BHvgqw/3pK2m2gAL%fengguang.wu@intel.com>
2012-12-11 14:30 ` Christoph Lameter
2012-12-11 14:49 ` Måns Rullgård [this message]
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=yw1xhans63u0.fsf@unicorn.mansr.com \
--to=mans@mansr.com \
--cc=cl@linux.com \
--cc=glommer@parallels.com \
--cc=js1304@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.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
all inboxes | Powered by JetHome®