From a9142e0e9ac7f5e7e26aedaee848becc67f250ac Mon Sep 17 00:00:00 2001 From: GranBurguesa Date: Fri, 17 Sep 2021 10:41:55 -0400 Subject: fix do/while guard for DONT_FAKE_TIME macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the newer version gcc warns `this ‘while’ clause does not guard... [-Werror=misleading-indentation]`. looks like the author just omitted the `do` and the `while(0) counts as a separate statement. in practice this isn't causing any actual problem now afaict. --- src/libfaketime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libfaketime.c b/src/libfaketime.c index 6def8f2..0dd037b 100644 --- a/src/libfaketime.c +++ b/src/libfaketime.c @@ -148,7 +148,7 @@ static __thread bool dont_fake = false; /* Wrapper for function calls, which we want to return system time */ #define DONT_FAKE_TIME(call) \ - { \ + do { \ bool dont_fake_orig = dont_fake; \ if (!dont_fake) \ { \ -- cgit v1.2.1