diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2008-06-29 04:39:16 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2008-06-29 04:39:16 +0000 |
commit | 4dc6c528c2b8e858ae65d91a82c6fae661894302 (patch) | |
tree | 2b48e3a63388183c42752ae73ac281a65cd85dd7 /gcc/alloc-pool.c | |
parent | 4152a484b4ddc476c40c2bfe9c30a743bdd018ac (diff) | |
download | gcc-4dc6c528c2b8e858ae65d91a82c6fae661894302.tar.gz |
alloc-pool.c (create_alloc_pool): Fix -Wc++-compat warnings.
* alloc-pool.c (create_alloc_pool): Fix -Wc++-compat warnings.
* df-scan.c (df_notes_rescan): Likewise.
* ggc-page.c (set_page_table_entry): Likewise.
* intl.c (gcc_gettext_width): Likewise.
* varasm.c (get_unnamed_section, get_noswitch_section,
get_section): Likewise.
From-SVN: r137245
Diffstat (limited to 'gcc/alloc-pool.c')
-rw-r--r-- | gcc/alloc-pool.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/alloc-pool.c b/gcc/alloc-pool.c index d5d1fab79af..b22869fe787 100644 --- a/gcc/alloc-pool.c +++ b/gcc/alloc-pool.c @@ -119,7 +119,7 @@ alloc_pool create_alloc_pool (const char *name, size_t size, size_t num) { alloc_pool pool; - size_t pool_size, header_size; + size_t header_size; #ifdef GATHER_STATISTICS struct alloc_pool_descriptor *desc; #endif @@ -141,11 +141,8 @@ create_alloc_pool (const char *name, size_t size, size_t num) /* Um, we can't really allocate 0 elements per block. */ gcc_assert (num); - /* Find the size of the pool structure, and the name. */ - pool_size = sizeof (struct alloc_pool_def); - - /* and allocate that much memory. */ - pool = xmalloc (pool_size); + /* Allocate memory for the pool structure. */ + pool = XNEW (struct alloc_pool_def); /* Now init the various pieces of our pool structure. */ pool->name = /*xstrdup (name)*/name; |