qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <weil@mail.berlios.de>
To: QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] sparc: Fix compiler warning (fprintf format string)
Date: Fri,  9 Apr 2010 22:49:53 +0200	[thread overview]
Message-ID: <1270846193-5667-5-git-send-email-weil@mail.berlios.de> (raw)
In-Reply-To: <1270846193-5667-1-git-send-email-weil@mail.berlios.de>

When argument checking is enabled, gcc throws this error:

error: format not a string literal and no format arguments

The patch rewrites the statement to satisfy the compiler.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 sparc-dis.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sparc-dis.c b/sparc-dis.c
index 83a12ae..611e74f 100644
--- a/sparc-dis.c
+++ b/sparc-dis.c
@@ -2778,7 +2778,7 @@ print_insn_sparc (bfd_vma memaddr, disassemble_info *info)
               /* Can't do simple format if source and dest are different.  */
               continue;
 
-          (*info->fprintf_func) (stream, opcode->name);
+          (*info->fprintf_func) (stream, "%s", opcode->name);
 
           {
             const char *s;
-- 
1.5.6.5

  parent reply	other threads:[~2010-04-09 20:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-09 20:49 [Qemu-devel] [PATCH] microblaze: Fix two format specifiers in disassembler Stefan Weil
2010-04-09 20:49 ` [Qemu-devel] [PATCH] arm: Fix compiler warning (fprintf format string) Stefan Weil
2010-04-13 22:16   ` Aurelien Jarno
2010-04-09 20:49 ` [Qemu-devel] [PATCH] m68k: " Stefan Weil
2010-04-13 22:17   ` Aurelien Jarno
2010-04-09 20:49 ` [Qemu-devel] [PATCH] sh4: " Stefan Weil
2010-04-13 22:17   ` Aurelien Jarno
2010-04-09 20:49 ` Stefan Weil [this message]
2010-04-13 22:17   ` [Qemu-devel] [PATCH] sparc: " Aurelien Jarno
2010-04-10 11:44 ` [Qemu-devel] [PATCH] microblaze: Fix two format specifiers in disassembler Thomas Monjalon

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=1270846193-5667-5-git-send-email-weil@mail.berlios.de \
    --to=weil@mail.berlios.de \
    --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).