summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-08-30 12:04:15 +0300
committerTor Lillqvist <tml@iki.fi>2013-08-30 12:13:46 +0300
commit16a4b7ad733f179498e39eac3d4092c55e6c0a07 (patch)
treedf05be0a60bef5b71f022971d4727afd049203e8 /sal
parentfb30ed471eb88870c53c882d623c4f9a7cb0a938 (diff)
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
Diffstat (limited to 'sal')
-rw-r--r--sal/rtl/alloc_arena.cxx8
-rw-r--r--sal/rtl/alloc_cache.cxx6
2 files changed, 7 insertions, 7 deletions
diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx
index 9017a5ac2305..f37d512dffff 100644
--- a/sal/rtl/alloc_arena.cxx
+++ b/sal/rtl/alloc_arena.cxx
@@ -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);
diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx
index d514cfc84514..138315533ec7 100644
--- a/sal/rtl/alloc_cache.cxx
+++ b/sal/rtl/alloc_cache.cxx
@@ -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)