[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] remote_driver.c: fix non-literal format strings w/o args



On 11/11/2010 10:27 AM, Daniel P. Berrange wrote:
> On Thu, Nov 11, 2010 at 12:17:33PM -0500, Laine Stump wrote:
>> Pushed another of these under the trivial rule (with correct email address
>> this time!).
>>
>> I guess I run into these so often because I build with --disable-nls 
>> and most other people don't...
> 
> We're constantly hitting this problem. We can't defalt to --disable-nls
> though. Is there any way we could practically check this with syntax-check ?

Unfortunately, it's not an easy regexp to write, so I'm not sure that we
can easily create a syntax check rule.  In general, it's tough, because
the problem is a multi-line issue: the problem only happens when
_("...") is the last argument to a printf-style function, but was not
preceded by a "%s" argument.  How do you find the end of a _("...")
string which might span multiple lines, to see if the next byte was ')'?

But we could make ./autobuild.sh do a --disable-nls build, as I
periodically run autobuild.sh.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]