From: Willy Tarreau Date: Thu, 11 Apr 2024 15:19:08 +0000 (+0200) Subject: BUILD: cache: fix non-inline vs inline declaration mismatch to silence a warning X-Git-Tag: v3.0-dev8~95 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b22b968a486e949b3ccfd955b65ddb61db14fe24;p=thirdparty%2Fhaproxy.git BUILD: cache: fix non-inline vs inline declaration mismatch to silence a warning Some compilers report this on the cache: src/cache.c:235: warning: 'release_entry_locked' declared inline after being called src/cache.c:235: warning: previous declaration of 'release_entry_locked' was here And indeed, the function is first declared non-inline and later inline. Let's just set the inline status from the beginning. It's not really needed to backport this. --- diff --git a/src/cache.c b/src/cache.c index 2c11db99df..79de40c5f5 100644 --- a/src/cache.c +++ b/src/cache.c @@ -232,8 +232,8 @@ DECLARE_STATIC_POOL(pool_head_cache_st, "cache_st", sizeof(struct cache_st)); static struct eb32_node *insert_entry(struct cache *cache, struct cache_tree *tree, struct cache_entry *new_entry); static void delete_entry(struct cache_entry *del_entry); -static void release_entry_locked(struct cache_tree *cache, struct cache_entry *entry); -static void release_entry_unlocked(struct cache_tree *cache, struct cache_entry *entry); +static inline void release_entry_locked(struct cache_tree *cache, struct cache_entry *entry); +static inline void release_entry_unlocked(struct cache_tree *cache, struct cache_entry *entry); /* * Find a cache_entry in the 's tree that has the hash .