summaryrefslogtreecommitdiff
path: root/ace/Malloc.cpp
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-12 14:41:22 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-12 14:41:22 +0000
commit8c5767580d6e45f311cba55a7981e8b5bd6ca9e9 (patch)
tree88ea1af2109cbb81c5a79494adbb58596e4aa51a /ace/Malloc.cpp
parent8c775decc6940fd8b1b767b702653cfac88e3ff4 (diff)
downloadATCD-8c5767580d6e45f311cba55a7981e8b5bd6ca9e9.tar.gz
(instance): wrap declaration of local "assertion" with ifndef
ACE_NDEBUG, to avoid warning about unused variable with debug=0.
Diffstat (limited to 'ace/Malloc.cpp')
-rw-r--r--ace/Malloc.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/ace/Malloc.cpp b/ace/Malloc.cpp
index 8cc622a7c00..9deaf271f0b 100644
--- a/ace/Malloc.cpp
+++ b/ace/Malloc.cpp
@@ -91,11 +91,13 @@ ACE_Allocator::instance (void)
static void *allocator_instance = 0;
// Check this critical assumption.
- // We put it in a variable first to avoid stupid compiler
- // warnings that the condition may always be true/false.
+ // We put it in a variable first to avoid stupid compiler
+ // warnings that the condition may always be true/false.
+# if !defined (ACE_NDEBUG)
int assertion = (sizeof allocator_instance ==
- sizeof (ACE_New_Allocator));
+ sizeof (ACE_New_Allocator));
ACE_ASSERT (assertion);
+# endif /* !ACE_NDEBUG */
// Initialize the allocator_instance by using a placement
// new. The ACE_NEW_RETURN below doesn't actually allocate