]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: cache: fix non-inline vs inline declaration mismatch to silence a warning
authorWilly Tarreau <w@1wt.eu>
Thu, 11 Apr 2024 15:19:08 +0000 (17:19 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Apr 2024 15:25:25 +0000 (17:25 +0200)
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.

src/cache.c

index 2c11db99dfbc0d563e079ce2c76e519fcfd0bbe8..79de40c5f5b821aad29ffce482ff6390128fb707 100644 (file)
@@ -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 <cache>'s tree that has the hash <hash>.