svn commit: r193475 - head/sbin/kldload
Jilles Tjoelker
jilles at stack.nl
Fri Jun 5 13:25:36 UTC 2009
On Fri, Jun 05, 2009 at 06:52:07PM +1000, Bruce Evans wrote:
> Well, %z might be wrong since only the pathlen variable is of type size_t.
> The expression `pathlen + 1' has type:
> __binarypromoteof(__typeof(pathlen), int)),
> so if size_t is smaller than int then the promotions are non-null and give
> a type larger than size_t, and %z is wrong. To use %z, the expression
> should be written as (size_t)(pathlen + 1).
The promotion is not a problem because it would happen anyway, as it is
an unprototyped parameter. printf and the like know this.
--
Jilles Tjoelker
More information about the svn-src-all
mailing list