Received: from eggs.gnu.org ([2001:4830:134:3::10]:45011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGRtS-00015t-Rj for qemu-devel@nongnu.org; Mon, 02 Sep 2013 07:02:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGRtO-0005M7-2F for qemu-devel@nongnu.org; Mon, 02 Sep 2013 07:02:02 -0400 From: Michael Tokarev Date: Mon, 2 Sep 2013 15:01:24 +0400 Message-Id: <1378119695-14568-5-git-send-email-mjt@msgid.tls.msk.ru> In-Reply-To: <1378119695-14568-1-git-send-email-mjt@msgid.tls.msk.ru> References: <1378119695-14568-1-git-send-email-mjt@msgid.tls.msk.ru> Subject: [Qemu-devel] [PULL 04/15] configure: disable clang -Wstring-plus-int warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev , qemu-devel@nongnu.org From: Peter Maydell 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. Signed-off-by: Peter Maydell Signed-off-by: Michael Tokarev --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 0a55c20..03157c7 100755 --- a/configure +++ b/configure @@ -1204,6 +1204,7 @@ gcc_flags="-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers $gcc_ gcc_flags="-Wmissing-include-dirs -Wempty-body -Wnested-externs $gcc_flags" gcc_flags="-Wendif-labels $gcc_flags" gcc_flags="-Wno-initializer-overrides $gcc_flags" +gcc_flags="-Wno-string-plus-int $gcc_flags" # Note that we do not add -Werror to gcc_flags here, because that would # enable it for all configure tests. If a configure test failed due # to -Werror this would just silently disable some features, -- 1.7.10.4