qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] r2d: fix build on mingw


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH] r2d: fix build on mingw
Date: Sat, 2 Feb 2019 00:07:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 2/2/19 12:00 AM, Michael S. Tsirkin wrote:
> Comment near strncpy explains kernel_cmdline does
> not need to be 0-terminated.
> 
> Accordingly mark it as QEMU_NONSTRING.
> 
> Without this, gcc warns:
>     'strncpy' specified bound 256 equals destination size
> 
> Signed-off-by: Michael S. Tsirkin <address@hidden>

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

> ---
>  hw/sh4/r2d.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
> index 5b399e7161..dcdb3728cb 100644
> --- a/hw/sh4/r2d.c
> +++ b/hw/sh4/r2d.c
> @@ -220,7 +220,7 @@ static struct QEMU_PACKED
>  
>      char pad[232];
>  
> -    char kernel_cmdline[256];
> +    char kernel_cmdline[256] QEMU_NONSTRING;
>  } boot_params;
>  
>  static void r2d_init(MachineState *machine)
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]