From 98a6e55d4e7eed5bb68480672a3358ee21b9dce8 Mon Sep 17 00:00:00 2001 From: Alexander Mahone <38128606+AlexanderMahone0@users.noreply.github.com> Date: Mon, 18 Mar 2024 14:22:19 +0800 Subject: [PATCH] Add missing REDIS_STATIC in quicklist (#13147) Compiler complained when I tried to compile only quicklist.c. Since static keyword is needed when a static function declaration is placed before its implementation. ``` #ifndef REDIS_STATIC #define REDIS_STATIC static #endif ``` [How to solve static declaration follows non-static declaration in GCC C code?](https://stackoverflow.com/questions/3148244/how-to-solve-static-declaration-follows-non-static-declaration-in-gcc-c-code) --- src/quicklist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/quicklist.c b/src/quicklist.c index 3776c9b85..7fe3430fc 100644 --- a/src/quicklist.c +++ b/src/quicklist.c @@ -100,8 +100,8 @@ quicklistBookmark *_quicklistBookmarkFindByName(quicklist *ql, const char *name) quicklistBookmark *_quicklistBookmarkFindByNode(quicklist *ql, quicklistNode *node); void _quicklistBookmarkDelete(quicklist *ql, quicklistBookmark *bm); -quicklistNode *_quicklistSplitNode(quicklistNode *node, int offset, int after); -quicklistNode *_quicklistMergeNodes(quicklist *quicklist, quicklistNode *center); +REDIS_STATIC quicklistNode *_quicklistSplitNode(quicklistNode *node, int offset, int after); +REDIS_STATIC quicklistNode *_quicklistMergeNodes(quicklist *quicklist, quicklistNode *center); /* Simple way to give quicklistEntry structs default values with one call. */ #define initEntry(e) \