[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/15] configure: disable clang -Wstring-plus-int war
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 04/15] configure: disable clang -Wstring-plus-int warning |
Date: |
Mon, 2 Sep 2013 15:01:24 +0400 |
From: Peter Maydell <address@hidden>
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 <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
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
- [Qemu-devel] [PULL 00/15] Trivial patches for 2013-09-02, Michael Tokarev, 2013/09/02
- [Qemu-devel] [PULL 01/15] slirp: Port redirection option behave differently on Linux and Windows, Michael Tokarev, 2013/09/02
- [Qemu-devel] [PULL 04/15] configure: disable clang -Wstring-plus-int warning,
Michael Tokarev <=
- [Qemu-devel] [PULL 02/15] misc: Fix some typos in names and comments, Michael Tokarev, 2013/09/02
- [Qemu-devel] [PULL 03/15] rdma: silly ipv6 bugfix, Michael Tokarev, 2013/09/02
- [Qemu-devel] [PULL 08/15] configure: Remove unneeded redirections of stderr (pkg-config --cflags, --libs), Michael Tokarev, 2013/09/02
- [Qemu-devel] [PULL 12/15] tci: Remove function tcg_out64 (fix broken build), Michael Tokarev, 2013/09/02
- [Qemu-devel] [PULL 11/15] target-arm: Report unimplemented opcodes (LOG_UNIMP), Michael Tokarev, 2013/09/02
- [Qemu-devel] [PULL 05/15] slirp/arp_table.c: Avoid shifting into sign bit of signed integers, Michael Tokarev, 2013/09/02
- [Qemu-devel] [PULL 13/15] qmp: fix integer usage in examples, Michael Tokarev, 2013/09/02
- [Qemu-devel] [PULL 07/15] configure: Don't write .pyc files by default (python -B), Michael Tokarev, 2013/09/02
- [Qemu-devel] [PULL 10/15] pflash_cfi02.c: fix debug macro, Michael Tokarev, 2013/09/02
- [Qemu-devel] [PULL 14/15] adlib: sort offsets in portio registration, Michael Tokarev, 2013/09/02