[PATCH] Fixed warning-to-error on mismatched printf parameter in control.c

Randy Dunlap rdunlap@xenotime.net
Fri Sep 21 17:00:00 GMT 2007


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



More information about the Systemtap mailing list