From: Frantisek Sumsal Date: Sat, 20 Aug 2022 19:57:18 +0000 (+0200) Subject: hashmap: use assert_se() to make clang happy X-Git-Tag: v252-rc1~391^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F24379%2Fhead;p=thirdparty%2Fsystemd.git hashmap: use assert_se() to make clang happy Otherwise it complains about a set but unused variable: ``` ../src/basic/hashmap.c:1070:48: error: variable 'n_rehashed' set but not used [-Werror,-Wunused-but-set-variable] unsigned old_n_buckets, new_n_buckets, n_rehashed, new_n_entries; ^ 1 error generated. ``` --- diff --git a/src/basic/hashmap.c b/src/basic/hashmap.c index 1fadaad9964..ddd329c8743 100644 --- a/src/basic/hashmap.c +++ b/src/basic/hashmap.c @@ -1190,7 +1190,7 @@ static int resize_buckets(HashmapBase *h, unsigned entries_add) { } while (rehash_next); } - assert(n_rehashed == n_entries(h)); + assert_se(n_rehashed == n_entries(h)); return 1; }