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

Re: [PATCH] Remove warning 'format not a string literal' in libsvn_client

From: Peter Samuelson <peter_at_p12n.org>
Date: Thu, 5 Nov 2009 10:33:02 -0600

[Daniel Näslund]
> if (! original_value)
> - header_fmt = _("Added: %s%s");
> + SVN_ERR(file_printf_from_utf8(file, encoding, "Added: %s%s",
> + propchange->name, APR_EOL_STR));

Julian talked about this code already, but just to point out: your
change is incorrect, because it removes the _() functionality, i.e.,
string localisation. You have to be careful about these things.

...Indeed, we use quite a lot of _() with printf format strings (see
all the references to 'c-format' in tools/po/po-update.sh). Why
aren't these _all_ warnings with your compiler?

-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2414768
Received on 2009-11-05 17:33:20 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.