aboutsummaryrefslogtreecommitdiff
path: root/gcc/bitmap.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2008-07-04 00:22:31 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2008-07-04 00:22:31 +0000
commitaebde504ad45f511fbc01e81a1c4b829c0a86379 (patch)
treee38528c1314ca502032e5d589afa8b97dd2e7f61 /gcc/bitmap.c
parent623d9580064bbb06e93b9b3f55f62907533f33e0 (diff)
downloadgcc-aebde504ad45f511fbc01e81a1c4b829c0a86379.zip
gcc-aebde504ad45f511fbc01e81a1c4b829c0a86379.tar.gz
gcc-aebde504ad45f511fbc01e81a1c4b829c0a86379.tar.bz2
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/bitmap.c')
-rw-r--r--gcc/bitmap.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index 4fabdc9..5e841e0 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -51,7 +51,8 @@ static htab_t bitmap_desc_hash;
static hashval_t
hash_descriptor (const void *p)
{
- const struct bitmap_descriptor *const d = p;
+ const struct bitmap_descriptor *const d =
+ (const struct bitmap_descriptor *) p;
return htab_hash_pointer (d->file) + d->line;
}
struct loc
@@ -63,8 +64,9 @@ struct loc
static int
eq_descriptor (const void *p1, const void *p2)
{
- const struct bitmap_descriptor *const d = p1;
- const struct loc *const l = p2;
+ const struct bitmap_descriptor *const d =
+ (const struct bitmap_descriptor *) p1;
+ const struct loc *const l = (const struct loc *) p2;
return d->file == l->file && d->function == l->function && d->line == l->line;
}
@@ -88,7 +90,7 @@ bitmap_descriptor (const char *file, const char *function, int line)
1);
if (*slot)
return *slot;
- *slot = xcalloc (sizeof (**slot), 1);
+ *slot = XCNEW (struct bitmap_descriptor);
(*slot)->file = file;
(*slot)->function = function;
(*slot)->line = line;