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

Eric Blake eblake at redhat.com
Thu Nov 11 17:44:22 UTC 2010


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 at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101111/392abb03/attachment-0001.sig>


More information about the libvir-list mailing list