From 43f371b32e2742f53741e08568eefdbad6714d2f Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 16 Dec 2017 18:29:07 +0100 Subject: [PATCH] Remove warnings. --- tests/test-mworker.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test-mworker.c b/tests/test-mworker.c index 2d465c3a..d4bf01e2 100644 --- a/tests/test-mworker.c +++ b/tests/test-mworker.c @@ -59,6 +59,12 @@ static void test1(void) } #if defined(__GNUC__) + +/* The macro version will generate warnings about shadow variables. + There is no way to avoid this. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" + static int fib2(int n) { if (n < 2) @@ -73,6 +79,8 @@ static int fib2(int n) return y1 + y2; } +#pragma GCC diagnostic pop + static void test2(void) { worker_init(w_g, 0, 0, NULL);