From 1b3b75208c243fe9e18f34c4fb5f0233c2dc5a7f Mon Sep 17 00:00:00 2001 From: Daniel Dai <764122422@qq.com> Date: Sun, 20 Sep 2020 05:06:17 -0400 Subject: [PATCH] fix make warnings in debug.c MacOS (#7805) Co-authored-by: Oran Agra --- src/debug.c | 6 +++--- src/server.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/debug.c b/src/debug.c index 153619334..13373b7c7 100644 --- a/src/debug.c +++ b/src/debug.c @@ -1563,7 +1563,7 @@ int memtest_test_linux_anonymous_maps(void) { closeDirectLogFiledes(fd); return errors; } -#endif +#endif /* HAVE_PROC_MAPS */ static void killMainThread(void) { int err; @@ -1580,7 +1580,7 @@ static void killMainThread(void) { * should be used only when it's critical to stop the threads for some reason. * Currently Redis does this only on crash (for instance on SIGSEGV) in order * to perform a fast memory check without other threads messing with memory. */ -static void killThreads(void) { +void killThreads(void) { killMainThread(); bioKillThreads(); killIOThreads(); @@ -1600,7 +1600,7 @@ void doFastMemoryTest(void) { "Fast memory test PASSED, however your memory can still be broken. Please run a memory test for several hours if possible.\n"); } } -#endif +#endif /* HAVE_PROC_MAPS */ } /* Scans the (assumed) x86 code starting at addr, for a max of `len` diff --git a/src/server.h b/src/server.h index a6859f554..1025b1654 100644 --- a/src/server.h +++ b/src/server.h @@ -2488,6 +2488,7 @@ void xorDigest(unsigned char *digest, void *ptr, size_t len); int populateCommandTableParseFlags(struct redisCommand *c, char *strflags); void debugDelay(int usec); void killIOThreads(void); +void killThreads(void); /* TLS stuff */ void tlsInit(void);