Skip to contentSkip to conversation

darwin-user: Use GCC_FMT_ATTR (format checking)

PATCH Applied Stefan Weil 2 participants 2 messages Nov 15, 2010 – Dec 4, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 darwin-user: Use GCC_FMT_ATTR (format checking)

The redundant forward declaration of qerror in machload.c is removed because it should be taken from qemu.h.

Please note that this patch is untested because I have no matching environment to compile it.

---
 darwin-user/machload.c |    2 +-
 darwin-user/qemu.h     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
darwin-user/machload.c +1 -1
index 4bb5c72..3bc3b65 100644
@@ -82,7 +82,7 @@ void *macho_text_sect = 0;
 int   macho_offset = 0;
 
 int load_object(const char *filename, struct target_pt_regs * regs, void ** mh);
-void qerror(const char *format, ...);
+
 #ifdef TARGET_I386
 typedef struct mach_i386_thread_state {
     unsigned int    eax;
darwin-user/qemu.h +1 -1
index 0c5081b..b6d3e6c 100644
@@ -100,7 +100,7 @@ int do_sigaction(int sig, const struct sigaction *act,
 int do_sigaltstack(const struct sigaltstack *ss, struct sigaltstack *oss);
 
 void gemu_log(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
-void qerror(const char *fmt, ...);
+void qerror(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
 
 void write_dt(void *ptr, unsigned long addr, unsigned long limit, int flags);
 
Signature · 1 line
1.7.2.3
Applied
#1 lore raw

Thanks, applied.

Quoted 43 lines · Stefan Weil

The redundant forward declaration of qerror in machload.c is removed because it should be taken from qemu.h.

Please note that this patch is untested because I have no matching environment to compile it.

---
 darwin-user/machload.c |    2 +-
 darwin-user/qemu.h     |    2 +-

 2 files changed, 2 insertions(+), 2 deletions(-)
darwin-user/machload.c +1 -1
index 4bb5c72..3bc3b65 100644
@@ -82,7 +82,7 @@ void *macho_text_sect = 0;
  int   macho_offset = 0;
 
  int load_object(const char *filename, struct target_pt_regs * regs, void ** mh);
-void qerror(const char *format, ...);
+
  #ifdef TARGET_I386
  typedef struct mach_i386_thread_state {
     unsigned int    eax;
darwin-user/qemu.h +1 -2
index 0c5081b..b6d3e6c 100644
@@ -100,7 +100,7 @@ int do_sigaction(int sig, const struct sigaction *act,
  int do_sigaltstack(const struct sigaltstack *ss, struct sigaltstack *oss);
 
  void gemu_log(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
-void qerror(const char *fmt, ...);
+void qerror(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
 
  void write_dt(void *ptr, unsigned long addr, unsigned long limit, int flags);
 
--

1.7.2.3