From: Stefan Weil <weil@mail.berlios.de>
To: QEMU Developers <qemu-devel@nongnu.org>
Cc: Blue Swirl <blauwirbel@gmail.com>
Subject: [Qemu-devel] [PATCH 2/3] Replace remaining gcc format attribute by macro GCC_FMT_ATTR (format checking)
Date: Thu, 23 Sep 2010 21:28:04 +0200 [thread overview]
Message-ID: <1285270085-11276-2-git-send-email-weil@mail.berlios.de> (raw)
In-Reply-To: <1285270085-11276-1-git-send-email-weil@mail.berlios.de>
Replace the remaining format attribute printf by macro
GCC_FMT_ATTR which uses gnu_printf (if supported).
This needs additional code changes:
* Add qemu-common.h (which defined GCC_FMT_ATTR) were needed.
* Remove standard includes when qemu-common.h was added.
qemu-common.h already provides these includes.
* Remove local definitions which now come from stdio.h.
These definitions were needed before tcg was introduced.
They raise conflicts when qemu-common.h is included.
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
cpu-all.h | 2 +-
cpu-exec.c | 2 ++
dyngen-exec.h | 9 ---------
target-alpha/op_helper.c | 1 +
target-arm/op_helper.c | 2 ++
target-cris/op_helper.c | 1 +
target-i386/op_helper.c | 1 +
target-m68k/op_helper.c | 2 ++
target-microblaze/op_helper.c | 2 +-
target-mips/op_helper.c | 3 ++-
target-ppc/op_helper.c | 3 ++-
target-sh4/op_helper.c | 4 ++--
target-sparc/op_helper.c | 1 +
13 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/cpu-all.h b/cpu-all.h
index 67a3266..11edddc 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -773,7 +773,7 @@ void cpu_dump_statistics (CPUState *env, FILE *f,
int flags);
void QEMU_NORETURN cpu_abort(CPUState *env, const char *fmt, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
+ GCC_FMT_ATTR(2, 3);
extern CPUState *first_cpu;
extern CPUState *cpu_single_env;
diff --git a/cpu-exec.c b/cpu-exec.c
index dbdfdcc..1cb36e0 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -16,6 +16,8 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+
+#include "qemu-common.h"
#include "config.h"
#include "exec.h"
#include "disas.h"
diff --git a/dyngen-exec.h b/dyngen-exec.h
index 5bfef3f..97e2556 100644
--- a/dyngen-exec.h
+++ b/dyngen-exec.h
@@ -40,15 +40,6 @@
/* XXX: This may be wrong for 64-bit ILP32 hosts. */
typedef void * host_reg_t;
-#ifdef CONFIG_BSD
-typedef struct __sFILE FILE;
-#else
-typedef struct FILE FILE;
-#endif
-extern int fprintf(FILE *, const char *, ...);
-extern int fputs(const char *, FILE *);
-extern int printf(const char *, ...);
-
#if defined(__i386__)
#define AREG0 "ebp"
#elif defined(__x86_64__)
diff --git a/target-alpha/op_helper.c b/target-alpha/op_helper.c
index ff5ae26..39a6a85 100644
--- a/target-alpha/op_helper.c
+++ b/target-alpha/op_helper.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu-common.h"
#include "exec.h"
#include "host-utils.h"
#include "softfloat.h"
diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c
index 9b1a014..71cd8ff 100644
--- a/target-arm/op_helper.c
+++ b/target-arm/op_helper.c
@@ -16,6 +16,8 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+
+#include "qemu-common.h"
#include "exec.h"
#include "helpers.h"
diff --git a/target-cris/op_helper.c b/target-cris/op_helper.c
index a60da94..9e21799 100644
--- a/target-cris/op_helper.c
+++ b/target-cris/op_helper.c
@@ -18,6 +18,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu-common.h"
#include "exec.h"
#include "mmu.h"
#include "helper.h"
diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c
index ec6b3e9..b1f3bf9 100644
--- a/target-i386/op_helper.c
+++ b/target-i386/op_helper.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu-common.h"
#include "exec.h"
#include "exec-all.h"
#include "host-utils.h"
diff --git a/target-m68k/op_helper.c b/target-m68k/op_helper.c
index 0711107..5c5fb5b 100644
--- a/target-m68k/op_helper.c
+++ b/target-m68k/op_helper.c
@@ -16,6 +16,8 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+
+#include "qemu-common.h"
#include "exec.h"
#include "helpers.h"
diff --git a/target-microblaze/op_helper.c b/target-microblaze/op_helper.c
index 3d2b313..dd6e262 100644
--- a/target-microblaze/op_helper.c
+++ b/target-microblaze/op_helper.c
@@ -17,7 +17,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <assert.h>
+#include "qemu-common.h"
#include "exec.h"
#include "helper.h"
#include "host-utils.h"
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index 41abd57..2429ff7 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -16,7 +16,8 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <stdlib.h>
+
+#include "qemu-common.h"
#include "exec.h"
#include "host-utils.h"
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index 3e6db85..4692646 100644
--- a/target-ppc/op_helper.c
+++ b/target-ppc/op_helper.c
@@ -16,7 +16,8 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <string.h>
+
+#include "qemu-common.h"
#include "exec.h"
#include "host-utils.h"
#include "helper.h"
diff --git a/target-sh4/op_helper.c b/target-sh4/op_helper.c
index 2e5f555..fdc183c 100644
--- a/target-sh4/op_helper.c
+++ b/target-sh4/op_helper.c
@@ -16,8 +16,8 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <assert.h>
-#include <stdlib.h>
+
+#include "qemu-common.h"
#include "exec.h"
#include "helper.h"
diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c
index be3c1e0..547793f 100644
--- a/target-sparc/op_helper.c
+++ b/target-sparc/op_helper.c
@@ -1,3 +1,4 @@
+#include "qemu-common.h"
#include "exec.h"
#include "host-utils.h"
#include "helper.h"
--
1.7.1
next prev parent reply other threads:[~2010-09-23 19:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-23 19:28 [Qemu-devel] [PATCH 1/3] Replace most gcc format attributes by macro GCC_FMT_ATTR (format checking) Stefan Weil
2010-09-23 19:28 ` Stefan Weil [this message]
2010-09-23 20:33 ` [Qemu-devel] Re: [PATCH 2/3] Replace remaining gcc format attribute " Blue Swirl
2010-09-23 20:44 ` Stefan Weil
2010-09-25 7:46 ` Blue Swirl
2010-10-04 19:29 ` [Qemu-devel] [RFC] Can we remove special handling of standard headers (introduced for dyngen / OSX?) Stefan Weil
2010-10-09 22:46 ` Andreas Färber
2010-10-11 16:22 ` Stefan Weil
2010-10-12 18:33 ` Blue Swirl
2010-10-12 18:23 ` [Qemu-devel] Re: [PATCH 2/3] Replace remaining gcc format attribute by macro GCC_FMT_ATTR (format checking) Blue Swirl
2010-09-23 19:28 ` [Qemu-devel] [PATCH 3/3] Use " Stefan Weil
2010-10-03 7:49 ` Blue Swirl
2010-10-03 7:48 ` [Qemu-devel] Re: [PATCH 1/3] Replace most gcc format attributes by macro " Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1285270085-11276-2-git-send-email-weil@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).