summaryrefslogtreecommitdiff
path: root/gcc/alloc-pool.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-08-21 11:26:16 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-08-21 11:26:16 +0000
commit825c743c8705689b8c9541da47e201fd02f66cf6 (patch)
treef543dc29e83d8afdea668b83aaf2e86c76660bcf /gcc/alloc-pool.c
parentc1aaec5bf88a551100211db824f9a5666d25c2b8 (diff)
alloc-pool.c (pool_alloc): Fix valgrind annotation.
2012-08-21 Richard Guenther <rguenther@suse.de> * alloc-pool.c (pool_alloc): Fix valgrind annotation. * tree.h: Fix typo and complete flags documentation. From-SVN: r190559
Diffstat (limited to 'gcc/alloc-pool.c')
-rw-r--r--gcc/alloc-pool.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/alloc-pool.c b/gcc/alloc-pool.c
index 9a588089e77..bedcf1f8bff 100644
--- a/gcc/alloc-pool.c
+++ b/gcc/alloc-pool.c
@@ -247,7 +247,9 @@ void *
pool_alloc (alloc_pool pool)
{
alloc_pool_list header;
- VALGRIND_DISCARD (int size);
+#ifdef ENABLE_VALGRIND_CHECKING
+ int size;
+#endif
if (GATHER_STATISTICS)
{
@@ -260,7 +262,9 @@ pool_alloc (alloc_pool pool)
}
gcc_checking_assert (pool);
- VALGRIND_DISCARD (size = pool->elt_size - offsetof (allocation_object, u.data));
+#ifdef ENABLE_VALGRIND_CHECKING
+ size = pool->elt_size - offsetof (allocation_object, u.data);
+#endif
/* If there are no more free elements, make some more!. */
if (!pool->returned_free_list)