PR 32093
* ctf-hash.c (ctf_dynhash_create_sized, ctf_hashtab_insert): Avoid
-Walloc-size warning.
if (key_free || value_free)
dynhash = malloc (sizeof (ctf_dynhash_t));
else
- dynhash = malloc (offsetof (ctf_dynhash_t, key_free));
+ {
+ void *p = malloc (offsetof (ctf_dynhash_t, key_free));
+ dynhash = p;
+ }
if (!dynhash)
return NULL;
if (key_free || value_free)
*slot = malloc (sizeof (ctf_helem_t));
else
- *slot = malloc (offsetof (ctf_helem_t, owner));
+ {
+ void *p = malloc (offsetof (ctf_helem_t, owner));
+ *slot = p;
+ }
if (!*slot)
return NULL;
(*slot)->key = key;