changeset 2808:ef21b86ad6b9

* include/mvarimpl.inl: * include/sepmetaimpl.inl: Fixed a few compiler warnings.
author jlarmour
date Tue, 17 Feb 2009 00:39:42 +0000
parents 9a8446cf24e9
children a0730cb32880
files packages/services/memalloc/common/current/ChangeLog packages/services/memalloc/common/current/include/mvarimpl.inl packages/services/memalloc/common/current/include/sepmetaimpl.inl
diffstat 3 files changed, 13 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/packages/services/memalloc/common/current/ChangeLog
+++ b/packages/services/memalloc/common/current/ChangeLog
@@ -1,3 +1,9 @@
+2009-02-03  Simon Kallweit  <simon.kallweit@intefo.ch>
+
+	* include/mvarimpl.inl:
+	* include/sepmetaimpl.inl:
+	Fixed a few compiler warnings.
+
 2009-01-09  John Dallaway  <john@dallaway.org.uk>
 
 	* cdl/memalloc.cdl: Invoke tclsh explicitly to avoid the need for
--- a/packages/services/memalloc/common/current/include/mvarimpl.inl
+++ b/packages/services/memalloc/common/current/include/mvarimpl.inl
@@ -152,7 +152,7 @@ Cyg_Mempool_Variable_Implementation::Cyg
 
     CYG_ASSERT( align > 0, "Bad alignment" );
     CYG_ASSERT(0!=align ,"align is zero");
-    CYG_ASSERT(0==(align & align-1),"align not a power of 2");
+    CYG_ASSERT(0==(align & (align-1)),"align not a power of 2");
 
     if ((unsigned)size < sizeof(struct memdq)) {
         bottom = NULL;
@@ -165,7 +165,7 @@ Cyg_Mempool_Variable_Implementation::Cyg
     alignment = align;
     while (alignment < (cyg_int32)sizeof(struct memdq))
         alignment += alignment;
-    CYG_ASSERT(0==(alignment & alignment-1),"alignment not a power of 2");
+    CYG_ASSERT(0==(alignment & (alignment-1)),"alignment not a power of 2");
 
     // the memdq for each allocation is always positioned immediately before
     // an aligned address, so that the allocation (i.e. what eventually gets
@@ -182,12 +182,12 @@ Cyg_Mempool_Variable_Implementation::Cyg
     
     CYG_ASSERT( top > bottom , "heap too small" );
     CYG_ASSERT( top <= (base+size), "top too large" );
-    CYG_ASSERT( ((cyg_int32)(top+sizeof(struct memdq)) & alignment-1)==0,
+    CYG_ASSERT( ((cyg_int32)(top+sizeof(struct memdq)) & (alignment-1))==0,
                 "top badly aligned" );
 
     struct memdq *hdq = &head, *dq = (struct memdq *)bottom;
     
-    CYG_ASSERT( ((cyg_int32)memdq2alloc(dq) & alignment-1)==0,
+    CYG_ASSERT( ((cyg_int32)memdq2alloc(dq) & (alignment-1))==0,
                  "bottom badly aligned" );
 
     hdq->prev = hdq->next = dq;
--- a/packages/services/memalloc/common/current/include/sepmetaimpl.inl
+++ b/packages/services/memalloc/common/current/include/sepmetaimpl.inl
@@ -273,7 +273,7 @@ Cyg_Mempool_Sepmeta_Implementation::Cyg_
 
     CYG_ASSERT( alignment > 0, "Bad alignment" );
     CYG_ASSERT( 0!=alignment, "alignment is zero" );
-    CYG_ASSERT( 0==(alignment & alignment-1), "alignment not a power of 2" );
+    CYG_ASSERT( 0==(alignment & (alignment-1)), "alignment not a power of 2" );
 
     obase=base;
     osize=size;
@@ -293,9 +293,9 @@ Cyg_Mempool_Sepmeta_Implementation::Cyg_
     
     CYG_ASSERT( top > bottom , "heap too small" );
     CYG_ASSERT( top <= (base+size), "top too large" );
-    CYG_ASSERT( (((cyg_int32)(top)) & alignment-1)==0,
+    CYG_ASSERT( (((cyg_int32)(top)) & (alignment-1))==0,
                 "top badly aligned" );
-    CYG_ASSERT( (((cyg_int32)(bottom)) & alignment-1)==0,
+    CYG_ASSERT( (((cyg_int32)(bottom)) & (alignment-1))==0,
                 "bottom badly aligned" );
 
     CYG_ASSERT( metatop > metabottom , "meta space too small" );