[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] arm: Fix compiler warning (fprintf format strin
From: |
Aurelien Jarno |
Subject: |
Re: [Qemu-devel] [PATCH] arm: Fix compiler warning (fprintf format string) |
Date: |
Wed, 14 Apr 2010 00:16:52 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Fri, Apr 09, 2010 at 10:49:50PM +0200, Stefan Weil wrote:
> 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 <address@hidden>
Thanks, applied.
> ---
> arm-dis.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arm-dis.c b/arm-dis.c
> index 4fb899e..5028555 100644
> --- a/arm-dis.c
> +++ b/arm-dis.c
> @@ -3149,14 +3149,14 @@ print_insn_thumb16 (bfd_vma pc, struct
> disassemble_info *info, long given)
> if (started)
> func (stream, ", ");
> started = 1;
> - func (stream, arm_regnames[14] /* "lr" */);
> + func (stream, "%s", arm_regnames[14] /* "lr" */);
> }
>
> if (domaskpc)
> {
> if (started)
> func (stream, ", ");
> - func (stream, arm_regnames[15] /* "pc" */);
> + func (stream, "%s", arm_regnames[15] /* "pc" */);
> }
>
> func (stream, "}");
> @@ -3699,7 +3699,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info
> *info, long given)
> }
> else
> {
> - func (stream, psr_name (given & 0xff));
> + func (stream, "%s", psr_name (given & 0xff));
> }
> break;
>
> @@ -3707,7 +3707,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info
> *info, long given)
> if ((given & 0xff) == 0)
> func (stream, "%cPSR", (given & 0x100000) ? 'S' : 'C');
> else
> - func (stream, psr_name (given & 0xff));
> + func (stream, "%s", psr_name (given & 0xff));
> break;
>
> case '0': case '1': case '2': case '3': case '4':
> --
> 1.5.6.5
>
>
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
address@hidden http://www.aurel32.net
- [Qemu-devel] [PATCH] microblaze: Fix two format specifiers in disassembler, Stefan Weil, 2010/04/09
- [Qemu-devel] [PATCH] m68k: Fix compiler warning (fprintf format string), Stefan Weil, 2010/04/09
- [Qemu-devel] [PATCH] sh4: Fix compiler warning (fprintf format string), Stefan Weil, 2010/04/09
- [Qemu-devel] [PATCH] sparc: Fix compiler warning (fprintf format string), Stefan Weil, 2010/04/09
- [Qemu-devel] [PATCH] arm: Fix compiler warning (fprintf format string), Stefan Weil, 2010/04/09
- Re: [Qemu-devel] [PATCH] arm: Fix compiler warning (fprintf format string),
Aurelien Jarno <=
- Re: [Qemu-devel] [PATCH] microblaze: Fix two format specifiers in disassembler, Thomas Monjalon, 2010/04/10