qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [PATCH] configure: disable clang -Wstring-plus-int wa


From: Michael Tokarev
Subject: Re: [Qemu-trivial] [PATCH] configure: disable clang -Wstring-plus-int warning
Date: Sun, 01 Sep 2013 19:07:14 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130827 Icedove/17.0.8

05.08.2013 23:16, Peter Maydell wrote:
Some versions of clang will warn about adding integers to strings:

disas/i386.c:4753:23: error: adding 'char' to a string does not append
       to the string [-Werror,-Wstring-plus-int]
       oappend ("%es:" + intel_syntax);
                ~~~~~~~^~~~~~~~~~~~~~
disas/i386.c:4753:23: note: use array indexing to silence this warning
       oappend ("%es:" + intel_syntax);
                       ^
                &      [             ]

disas/i386.c uses this idiom to to skip a "%" prefix if using intel
rather than AT&T syntax. This seems like a reasonable  thing to do,
and I don't think anybody contributing to QEMU is likely to believe
that '+' is a string concatenation operator in C, so just disable
-Wstring-plus-int.

Thanks, applied to the trivial-patches queue.

/mjt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]