From 18395cb5074c0e039cd715299e82fd1d024559b7 Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Tue, 29 Sep 2015 23:55:14 -0700 Subject: [PATCH] Ignore explicit infinite recursion. Clang 3.8 warns against this now, and it is tripping up part of a test. We suppress the warning, since we are trying to actually test that this behavior is properly handled. Change-Id: I8705900572e1a6704bbdc001fece3e2d16c7077c --- debuggerd/crasher.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debuggerd/crasher.c b/debuggerd/crasher.c index b5064b485..59ac8daf4 100644 --- a/debuggerd/crasher.c +++ b/debuggerd/crasher.c @@ -51,6 +51,9 @@ __attribute__ ((noinline)) static int smash_stack(volatile int* plen) { return 0; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Winfinite-recursion" + static void* global = 0; // So GCC doesn't optimize the tail recursion out of overflow_stack. __attribute__((noinline)) static void overflow_stack(void* p) { @@ -60,6 +63,8 @@ __attribute__((noinline)) static void overflow_stack(void* p) { overflow_stack(&buf); } +#pragma clang diagnostic pop + static void *noisy(void *x) { char c = (uintptr_t) x;