hashmap: don't allow hashmap_type_info table to be optimized away
This makes debugging hashmaps harder, because we can't query the size. Make sure that table is always present.
This commit is contained in:
+1
-1
@@ -254,7 +254,7 @@ struct hashmap_type_info {
|
||||
unsigned n_direct_buckets;
|
||||
};
|
||||
|
||||
static const struct hashmap_type_info hashmap_type_info[_HASHMAP_TYPE_MAX] = {
|
||||
static _used_ const struct hashmap_type_info hashmap_type_info[_HASHMAP_TYPE_MAX] = {
|
||||
[HASHMAP_TYPE_PLAIN] = {
|
||||
.head_size = sizeof(Hashmap),
|
||||
.entry_size = sizeof(struct plain_hashmap_entry),
|
||||
|
||||
Reference in New Issue
Block a user