Re: [PATCH for 7.2] Fix broken configure with -Wunused-parameter

2022-11-03 Thread Paolo Bonzini
On 11/2/22 21:22, Stefan Weil via wrote: != "no"; then cat > $TMPC << EOF int main(int argc, char *argv[]) { +(void)argc; char arr[64], *p = arr, *c = argv[0]; You could use argv[argc - 1] instead. Paolo while (*c) { *p++ = *c++;

Re: [PATCH for 7.2] Fix broken configure with -Wunused-parameter

2022-11-03 Thread Paolo Bonzini
On 11/3/22 09:58, Daniel P. Berrangé wrote: On Wed, Nov 02, 2022 at 09:22:58PM +0100, Stefan Weil via wrote: The configure script fails because it tries to compile small C programs with a main function which is declared with arguments argc and argv although those arguments are unused. Running `

Re: [PATCH for 7.2] Fix broken configure with -Wunused-parameter

2022-11-03 Thread Stefan Weil via
Am 03.11.22 um 12:48 schrieb Peter Maydell: On Wed, 2 Nov 2022 at 20:24, Stefan Weil via wrote: The configure script fails because it tries to compile small C programs with a main function which is declared with arguments argc and argv although those arguments are unused. Running `configure -

Re: [PATCH for 7.2] Fix broken configure with -Wunused-parameter

2022-11-03 Thread Peter Maydell
On Wed, 2 Nov 2022 at 20:24, Stefan Weil via wrote: > > The configure script fails because it tries to compile small C programs > with a main function which is declared with arguments argc and argv > although those arguments are unused. > > Running `configure -extra-cflags=-Wunused-parameter` trig

Re: [PATCH for 7.2] Fix broken configure with -Wunused-parameter

2022-11-03 Thread Stefan Weil via
Am 03.11.22 um 09:58 schrieb Daniel P. Berrangé: On Wed, Nov 02, 2022 at 09:22:58PM +0100, Stefan Weil via wrote: The configure script fails because it tries to compile small C programs with a main function which is declared with arguments argc and argv although those arguments are unused. Run

Re: [PATCH for 7.2] Fix broken configure with -Wunused-parameter

2022-11-03 Thread Daniel P . Berrangé
On Wed, Nov 02, 2022 at 09:22:58PM +0100, Stefan Weil via wrote: > The configure script fails because it tries to compile small C programs > with a main function which is declared with arguments argc and argv > although those arguments are unused. > > Running `configure -extra-cflags=-Wunused-para

[PATCH for 7.2] Fix broken configure with -Wunused-parameter

2022-11-02 Thread Stefan Weil via
The configure script fails because it tries to compile small C programs with a main function which is declared with arguments argc and argv although those arguments are unused. Running `configure -extra-cflags=-Wunused-parameter` triggers the problem. configure for a native build does abort but sh