This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] Fixed warning-to-error on mismatched printf parameter in control.c
- From: Randy Dunlap <rdunlap at xenotime dot net>
- To: Martin Hunt <hunt at redhat dot com>
- Cc: Alan dot Brunelle at hp dot com, systemtap at sources dot redhat dot com
- Date: Fri, 21 Sep 2007 09:23:55 -0700
- Subject: Re: [PATCH] Fixed warning-to-error on mismatched printf parameter in control.c
- Organization: YPO4
- References: <46F3B60F.70909@hp.com> <1190382423.4055.0.camel@dragon>
On Fri, 21 Sep 2007 09:47:03 -0400 Martin Hunt wrote:
> Thanks for the patch. I have checked it in.
There is a C-language (library) format specifier for size_t.
It's %z, as in %zd or %zu, so the
count:%d len:%d
should be
count:%zd len:%d
Quoting the C-99 spec:
z Specifies that a following d, i, o, u, x, or X conversion specifier
applies to a size_t or the corresponding signed integer type argument;
or that a following n conversion specifier applies to a pointer to a
signed integer type corresponding to size_t argument.
---
~Randy