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

Re: svn commit: r28495 - branches/reintegrate/subversion/libsvn_fs_fs

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-12-15 02:53:41 CET

On Dec 14, 2007 5:49 PM, Blair Zajac <blair@orcaware.com> wrote:
>
> 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 :)

Aha! Thanks Blair! I knew I had successfully used the #defines before...

--dave

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
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:53:52 2007

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