On Thu, Oct 14, 2010 at 9:20 AM, Markus Armbruster <arm...@redhat.com> wrote:
> Blue Swirl <blauwir...@gmail.com> writes:
>
>> On Wed, Oct 13, 2010 at 7:19 AM, Markus Armbruster <arm...@redhat.com> wrote:
>>> Blue Swirl <blauwir...@gmail.com> writes:
>>>
>>>> On Mon, Oct 11, 2010 at 12:52 PM, Markus Armbruster <arm...@redhat.com> 
>>>> wrote:
>>>>> Warns about this line in check-qjson.c:
>>>>>    QObject *obj = qobject_from_json("");
>>>>>
>>>>> The obvious fix (add -Wno-format-zero-length to gcc_flags) doesn't
>>>>> work, because -Wall switches it on again.  Fix by putting configured
>>>>> flags last.
>>>>
>>>> This would disable the flag globally. I'd rather disable the flag only
>>>> for check-qjson.o
>>>
>>> Is this warning worth the hassle?  What's the problem with empty format
>>> strings?
>>
>> Your fix solves this specific case, but it also degrades the gcc
>> checks of the mainstream code (slightly). I think the test suite need
>> not follow the level of checking that should be applied to mainstream,
>> or at least the warnings there should not be fatal.
>
> "Degrade" implies we miss something that's "wrong" enough to be worth
> avoiding.  What's wrong with empty format strings?

They generate useless calls to the formatting function, wasting
performance (slightly). Since there are no calls currently, this is of
course hypothetical.

We don't want those to appear in QEMU, but for test suite they may be
acceptable (for example, to test empty format string handling) because
test suite is not performance critical.

Reply via email to