WaE: C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits
1UL is not a portable way to get a size_t -sized one. Change-Id: I8fac16b7e1f1b8bbccb4bd11eacc9449fc3f8c33
This commit is contained in:
@@ -452,7 +452,7 @@ rtl_arena_segment_alloc (
|
||||
}
|
||||
|
||||
/* roundup to next power of 2 */
|
||||
size = (1UL << msb);
|
||||
size = (((sal_Size)1) << msb);
|
||||
}
|
||||
|
||||
index = lowbit(RTL_MEMORY_P2ALIGN(arena->m_freelist_bitmap, size));
|
||||
@@ -619,7 +619,7 @@ rtl_arena_constructor (void * obj)
|
||||
head = &(arena->m_freelist_head[i]);
|
||||
rtl_arena_segment_constructor (head);
|
||||
|
||||
head->m_size = (1UL << i);
|
||||
head->m_size = (((sal_Size)1) << i);
|
||||
head->m_type = RTL_ARENA_SEGMENT_TYPE_HEAD;
|
||||
}
|
||||
|
||||
@@ -658,7 +658,7 @@ rtl_arena_destructor (void * obj)
|
||||
{
|
||||
head = &(arena->m_freelist_head[i]);
|
||||
|
||||
assert(head->m_size == (1UL << i));
|
||||
assert(head->m_size == (((sal_Size)1) << i));
|
||||
assert(head->m_type == RTL_ARENA_SEGMENT_TYPE_HEAD);
|
||||
|
||||
rtl_arena_segment_destructor (head);
|
||||
@@ -694,7 +694,7 @@ rtl_arena_activate (
|
||||
if (!RTL_MEMORY_ISP2(quantum))
|
||||
{
|
||||
/* roundup to next power of 2 */
|
||||
quantum = (1UL << highbit(quantum));
|
||||
quantum = (((sal_Size)1) << highbit(quantum));
|
||||
}
|
||||
quantum_cache_max = RTL_MEMORY_P2ROUNDUP(quantum_cache_max, quantum);
|
||||
|
||||
|
@@ -859,9 +859,9 @@ rtl_cache_activate (
|
||||
if (flags & RTL_CACHE_FLAG_QUANTUMCACHE)
|
||||
{
|
||||
/* next power of 2 above 3 * qcache_max */
|
||||
if(slabsize < (1UL << highbit(3 * source->m_qcache_max)))
|
||||
if(slabsize < (((sal_Size)1) << highbit(3 * source->m_qcache_max)))
|
||||
{
|
||||
slabsize = (1UL << highbit(3 * source->m_qcache_max));
|
||||
slabsize = (((sal_Size)1) << highbit(3 * source->m_qcache_max));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -875,7 +875,7 @@ rtl_cache_activate (
|
||||
|
||||
slabsize = RTL_MEMORY_P2ROUNDUP(slabsize, source->m_quantum);
|
||||
if (!RTL_MEMORY_ISP2(slabsize))
|
||||
slabsize = 1UL << highbit(slabsize);
|
||||
slabsize = (((sal_Size)1) << highbit(slabsize));
|
||||
cache->m_slab_size = slabsize;
|
||||
|
||||
if (cache->m_slab_size > source->m_quantum)
|
||||
|
Reference in New Issue
Block a user