[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 1/2] mips_fulong2e: Fix format strings
From: |
Blue Swirl |
Subject: |
[Qemu-devel] Re: [PATCH 1/2] mips_fulong2e: Fix format strings |
Date: |
Tue, 21 Sep 2010 19:48:03 +0000 |
Thanks, applied.
On Mon, Sep 20, 2010 at 8:18 PM, Stefan Weil <address@hidden> wrote:
> Fix two compiler warnings (when format attribute is applied)
> and one error (missing %) in format strings.
>
> Cc: Aurelien Jarno <address@hidden>
> Cc: Blue Swirl <address@hidden>
> Signed-off-by: Stefan Weil <address@hidden>
> ---
> hw/mips_fulong2e.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c
> index ac82067..61ca9c4 100644
> --- a/hw/mips_fulong2e.c
> +++ b/hw/mips_fulong2e.c
> @@ -141,13 +141,13 @@ static int64_t load_kernel (CPUState *env)
> prom_size = ENVP_NB_ENTRIES * (sizeof(int32_t) + ENVP_ENTRY_SIZE);
> prom_buf = qemu_malloc(prom_size);
>
> - prom_set(prom_buf, index++, loaderparams.kernel_filename);
> + prom_set(prom_buf, index++, "%s", loaderparams.kernel_filename);
> if (initrd_size > 0) {
> - prom_set(prom_buf, index++, "rd_start=0x" PRIx64 " rd_size=%li %s",
> + prom_set(prom_buf, index++, "rd_start=0x%" PRIx64 " rd_size=%li %s",
> cpu_mips_phys_to_kseg0(NULL, initrd_offset), initrd_size,
> loaderparams.kernel_cmdline);
> } else {
> - prom_set(prom_buf, index++, loaderparams.kernel_cmdline);
> + prom_set(prom_buf, index++, "%s", loaderparams.kernel_cmdline);
> }
>
> /* Setup minimum environment variables */
> --
> 1.7.1
>
>
[Qemu-devel] [PATCH 2/2] Use new gcc format attribute gnu_printf, Stefan Weil, 2010/09/13
Re: [Qemu-devel] [PATCH] mips_malta: Detect format errors for function prom_set, Blue Swirl, 2010/09/20
Re: [Qemu-devel] [PATCH] mips_fulong2e: Detect format errors for function prom_set, Blue Swirl, 2010/09/20