[PATCH v3 18/17] tests/unit/test-char: Replace g_alloca() by buffer on the stack

2021-05-07 Thread Philippe Mathieu-Daudé
The ALLOCA(3) man-page mentions its "use is discouraged". Directly reserve the CharBackend on the stack. Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/test-char.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/unit/test-char.c b/tests/unit/test-char.c index 5

Re: [PATCH v3 18/17] tests/unit/test-char: Replace g_alloca() by buffer on the stack

2021-05-07 Thread Marc-André Lureau
Hi On Fri, May 7, 2021 at 9:22 PM Philippe Mathieu-Daudé wrote: > The ALLOCA(3) man-page mentions its "use is discouraged". > > Directly reserve the CharBackend on the stack. > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/unit/test-char.c | 3 +-- > 1 file changed, 1 insertion(+), 2 d

Re: [PATCH v3 18/17] tests/unit/test-char: Replace g_alloca() by buffer on the stack

2021-05-07 Thread Richard Henderson
On 5/7/21 1:44 PM, Marc-André Lureau wrote: -    CharBackend *be; +    CharBackend tmpbe, *be = &tmpbe; Why introduce tmpbe? to avoid some code churn? I would rather update the code to use be. or &be. There's a branch with "be = reuse_chr->be" r~