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);