mirror of
https://github.com/systemd/systemd.git
synced 2026-08-04 15:10:33 +00:00
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.
```
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user