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

Re: [PATCH] svn_cmdline_printf and friends, take2

From: Nicolás Lichtmaier <nick_at_reloco.com.ar>
Date: 2004-05-12 15:03:22 CEST

>+svn_error_t *svn_cmdline_printf (apr_pool_t *pool,
>+ const char *fmt,
>+ ...);

By using "printf" subversion has been taking advantage of a GCC feature:
to report error in format strings. This is a very good thing, as thee
inconsistencies are common and can be fatal. It would be wise to add the
gettext "hint" informing that these functions are "printf like".

It would be:

svn_error_t *svn_cmdline_printf (apr_pool_t *pool,+ const char *fmt,+ ...)
        __attribute__ ((format (printf, 2, 3)));

Of course, this should be only done for GCC.

GLib has a macro for this, which is defined to do nothing if !GCC:


And it would be useful to add the --flag option to the xgettext
invocation so that format strings are properly marked as such.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 12 15:06:01 2004

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.