# HG changeset patch # User jlarmour # Date 1234831182 0 # Node ID ef21b86ad6b9dc175ed7390723748da98d7362e8 # Parent 9a8446cf24e9e52ae14a84c08e062ca3f0b12521 * include/mvarimpl.inl: * include/sepmetaimpl.inl: Fixed a few compiler warnings. diff --git a/packages/services/memalloc/common/current/ChangeLog b/packages/services/memalloc/common/current/ChangeLog --- a/packages/services/memalloc/common/current/ChangeLog +++ b/packages/services/memalloc/common/current/ChangeLog @@ -1,3 +1,9 @@ +2009-02-03 Simon Kallweit + + * include/mvarimpl.inl: + * include/sepmetaimpl.inl: + Fixed a few compiler warnings. + 2009-01-09 John Dallaway * cdl/memalloc.cdl: Invoke tclsh explicitly to avoid the need for diff --git a/packages/services/memalloc/common/current/include/mvarimpl.inl b/packages/services/memalloc/common/current/include/mvarimpl.inl --- 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; diff --git a/packages/services/memalloc/common/current/include/sepmetaimpl.inl b/packages/services/memalloc/common/current/include/sepmetaimpl.inl --- 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" );