diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2008-07-04 00:22:31 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2008-07-04 00:22:31 +0000 |
commit | aebde504ad45f511fbc01e81a1c4b829c0a86379 (patch) | |
tree | e38528c1314ca502032e5d589afa8b97dd2e7f61 /gcc/alloc-pool.c | |
parent | 623d9580064bbb06e93b9b3f55f62907533f33e0 (diff) | |
download | gcc-aebde504ad45f511fbc01e81a1c4b829c0a86379.tar.gz |
alloc-pool.c (hash_descriptor, [...]): Fix -Wc++-compat warnings.
* alloc-pool.c (hash_descriptor, eq_descriptor,
alloc_pool_descriptor): Fix -Wc++-compat warnings.
* bitmap.c (hash_descriptor, eq_descriptor, bitmap_descriptor):
Likewise.
* ggc-common.c (hash_descriptor, eq_descriptor, hash_ptr, eq_ptr,
loc_descriptor, ggc_prune_ptr, ggc_free_overhead,
final_cmp_statistic, cmp_statistic, dump_ggc_loc_statistics):
Likewise.
* varray.c (hash_descriptor, eq_descriptor, varray_descriptor):
Likewise.
From-SVN: r137446
Diffstat (limited to 'gcc/alloc-pool.c')
-rw-r--r-- | gcc/alloc-pool.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/alloc-pool.c b/gcc/alloc-pool.c index b22869fe787..7f0dc8ce7d2 100644 --- a/gcc/alloc-pool.c +++ b/gcc/alloc-pool.c @@ -81,13 +81,15 @@ static htab_t alloc_pool_hash; static hashval_t hash_descriptor (const void *p) { - const struct alloc_pool_descriptor *d = p; + const struct alloc_pool_descriptor *const d = + (const struct alloc_pool_descriptor * )p; return htab_hash_pointer (d->name); } static int eq_descriptor (const void *p1, const void *p2) { - const struct alloc_pool_descriptor *d = p1; + const struct alloc_pool_descriptor *const d = + (const struct alloc_pool_descriptor *) p1; return d->name == p2; } @@ -106,7 +108,7 @@ alloc_pool_descriptor (const char *name) 1); if (*slot) return *slot; - *slot = xcalloc (sizeof (**slot), 1); + *slot = XCNEW (struct alloc_pool_descriptor); (*slot)->name = name; return *slot; } |