[Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string

2010-10-16 Thread Paolo Bonzini
On 10/15/2010 07:41 PM, Blue Swirl wrote: Which functions are optimized away and which aren't? It's builtins only that are optimized away or otherwise inlined (printf, sprintf, etc.). Other calls stay, together with side effects and clock cycles. Paolo

Re: [Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string

2010-10-16 Thread Blue Swirl
On Sat, Oct 16, 2010 at 12:37 AM, Paolo Bonzini pbonz...@redhat.com wrote: On 10/15/2010 07:41 PM, Blue Swirl wrote: Which functions are optimized away and which aren't? It's builtins only that are optimized away or otherwise inlined (printf, sprintf, etc.).  Other calls stay, together with

Re: [Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string

2010-10-15 Thread Blue Swirl
On Fri, Oct 15, 2010 at 1:33 AM, Paolo Bonzini pbonz...@redhat.com wrote: On 10/14/2010 07:59 PM, Blue Swirl wrote: It is even more hypothetical when empty-format printfs are optimized away by GCC: $ gcc -x c - -O2 -S -o - #includestdio.h main() { printf (); }        .file          

[Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string

2010-10-14 Thread Markus Armbruster
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

[Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string

2010-10-14 Thread Blue Swirl
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

[Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string

2010-10-14 Thread Paolo Bonzini
On 10/14/2010 06:38 PM, Blue Swirl wrote: On Thu, Oct 14, 2010 at 9:20 AM, Markus Armbrusterarm...@redhat.com wrote: Blue Swirlblauwir...@gmail.com writes: On Wed, Oct 13, 2010 at 7:19 AM, Markus Armbrusterarm...@redhat.com wrote: Blue Swirlblauwir...@gmail.com writes: On Mon, Oct 11,

[Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string

2010-10-14 Thread Blue Swirl
On Thu, Oct 14, 2010 at 5:52 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 10/14/2010 06:38 PM, Blue Swirl wrote: On Thu, Oct 14, 2010 at 9:20 AM, Markus Armbrusterarm...@redhat.com  wrote: Blue Swirlblauwir...@gmail.com  writes: On Wed, Oct 13, 2010 at 7:19 AM, Markus

[Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string

2010-10-14 Thread Paolo Bonzini
On 10/14/2010 07:59 PM, Blue Swirl wrote: It is even more hypothetical when empty-format printfs are optimized away by GCC: $ gcc -x c - -O2 -S -o - #includestdio.h main() { printf (); } .file .text .p2align 4,,15 .globl main .type main, @function main:

[Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string

2010-10-13 Thread Markus Armbruster
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

[Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string

2010-10-13 Thread Blue Swirl
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

[Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string

2010-10-12 Thread Blue Swirl
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

[Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string

2010-10-11 Thread Paolo Bonzini
On 10/11/2010 02:52 PM, Markus Armbruster 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. Signed-off-by: