[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1052151 - /subversion/trunk/tools/server-side/svn-populate-node-origins-index.c

From: Blair Zajac <blair_at_orcaware.com>
Date: Thu, 23 Dec 2010 21:11:14 -0800

On 12/23/10 2:07 AM, Julian Foad wrote:
> blair_at_apache.org wrote:
>> URL: http://svn.apache.org/viewvc?rev=1052151&view=rev
>> Log:
>> Remove a gcc "implicit conversion shortens 64-bit value into a 32-bit
>> value" warning.
>
> tools/server-side/svn-populate-node-origins-index.c:140: warning: format
> ‘%ld’ expects type ‘long int’, but argument 3 has type ‘size_t’
> tools/server-side/svn-populate-node-origins-index.c:140: warning: format
> ‘%ld’ expects type ‘long int’, but argument 4 has type ‘size_t’
>
> The relationship between size_t and int varies among platforms. I think
> you should cast (impicitly or explicitly) to "int", as there doesn't
> seem to be a standard way to print it in C'89. (APR provides apr_size_t
> and APR_SIZE_T_FMT, however; not sure if that's any use to you here.)

Thanks, fixed in r1052448. I went with the APR_SIZE_T_FMT approach instead of a
cast.

Blair
Received on 2010-12-24 06:11:52 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.