David Glasser wrote:
> On Dec 14, 2007 5:29 PM, Blair Zajac <blair@orcaware.com> wrote:
>> glasser@tigris.org wrote:
>>> Author: glasser
>>> Date: Fri Dec 14 16:50:14 2007
>>> New Revision: 28495
>>>
>>> Log:
>>> Followup to r28489.
>>> Modified: branches/reintegrate/subversion/libsvn_fs_fs/fs_fs.c
>>> URL: http://svn.collab.net/viewvc/svn/branches/reintegrate/subversion/libsvn_fs_fs/fs_fs.c?pathrev=28495&r1=28494&r2=28495
>>> ==============================================================================
>>> --- branches/reintegrate/subversion/libsvn_fs_fs/fs_fs.c (original)
>>> +++ branches/reintegrate/subversion/libsvn_fs_fs/fs_fs.c Fri Dec 14 16:50:14 2007
>>> @@ -1660,8 +1660,7 @@
>>> SVN_ERR(svn_stream_printf(outfile, pool, HEADER_FRESHTXNRT ": y\n"));
>>>
>>> if (noderev->mergeinfo_count > 0)
>>> - SVN_ERR(svn_stream_printf(outfile, pool, HEADER_MINFO_CNT ": "
>>> - APR_UINT64_T_FMT "\n",
>>> + SVN_ERR(svn_stream_printf(outfile, pool, HEADER_MINFO_CNT ": %lld\n",
>>> noderev->mergeinfo_count));
>> I'm pretty sure that needs to use APR_INT64_T_FMT otherwise it'll fail on x86_64
>> with gcc and end up having %ld in the output string.
>
> Ah, I had that before and gcc was giving me a warning:
>
> subversion/libsvn_fs_fs/fs_fs.c: In function 'write_noderev_txn':
> subversion/libsvn_fs_fs/fs_fs.c:1663: warning: too many arguments for format
>
> I guess that warning in GCC doesn't follow #defines?
It does follow defines.
The problem is that the defines are defined without the %:
#define APR_INT64_T_FMT "lld"
#define APR_UINT64_T_FMT "llu"
So they have to be added to the string before the define is used. I've made the
same mistake myself and wondered, why am i getting an ldd here :)
Blair
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 15 02:50:14 2007