qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix tcg_out_vec_op argument type


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] Fix tcg_out_vec_op argument type
Date: Wed, 27 Oct 2021 12:05:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

On 10/27/21 10:56, Miroslav Rezanina wrote:
> Newly defined tcg_out_vec_op (34ef767609 tcg/s390x: Add host vector framework)
> for s390x uses pointer argument definition.
> This fails on gcc 11 as original declaration uses array argument:
> 
> In file included from ../tcg/tcg.c:430:
> /builddir/build/BUILD/qemu-6.1.50/tcg/s390x/tcg-target.c.inc:2702:42: error: 
> argument 5 of type 'const TCGArg *' {aka 'const long unsigned int *'} 
> declared as a pointer [-Werror=array-parameter=]
>  2702 |                            const TCGArg *args, const int *const_args)
>       |                            ~~~~~~~~~~~~~~^~~~
> ../tcg/tcg.c:121:41: note: previously declared as an array 'const TCGArg[16]' 
> {aka 'const long unsigned int[16]'}
>   121 |                            const TCGArg args[TCG_MAX_OP_ARGS],
>       |                            ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
> In file included from ../tcg/tcg.c:430:
> /builddir/build/BUILD/qemu-6.1.50/tcg/s390x/tcg-target.c.inc:2702:59: error: 
> argument 6 of type 'const int *' declared as a pointer 
> [-Werror=array-parameter=]
>  2702 |                            const TCGArg *args, const int *const_args)
>       |                                                ~~~~~~~~~~~^~~~~~~~~~
> ../tcg/tcg.c:122:38: note: previously declared as an array 'const int[16]'
>   122 |                            const int const_args[TCG_MAX_OP_ARGS]);
>       |                            ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Fixing argument type to pass build.

Similarly to commit 5e8892db93f ("tcg: Fix prototypes for tcg_out_vec_op
and tcg_out_op"), fix the argument type.

> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
> ---
>  tcg/s390x/tcg-target.c.inc | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>



reply via email to

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