summaryrefslogtreecommitdiffstats
path: root/src/H5SL.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-06-07 13:01:50 (GMT)
committerGitHub <noreply@github.com>2023-06-07 13:01:50 (GMT)
commite4929ef4e0d112cc065ad333b16cbb59073da24a (patch)
tree312a90379b1227ed4e447fe04818489162d37f78 /src/H5SL.c
parentb3d9a065551ff77647f261a221e1d062d0d6da12 (diff)
downloadhdf5-e4929ef4e0d112cc065ad333b16cbb59073da24a.zip
hdf5-e4929ef4e0d112cc065ad333b16cbb59073da24a.tar.gz
hdf5-e4929ef4e0d112cc065ad333b16cbb59073da24a.tar.bz2
Fix MSVC 32/64 bit shift conversion warnings (#3067)
Diffstat (limited to 'src/H5SL.c')
-rw-r--r--src/H5SL.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5SL.c b/src/H5SL.c
index fbd0b0d..11ccb9f 100644
--- a/src/H5SL.c
+++ b/src/H5SL.c
@@ -156,9 +156,9 @@
#define H5SL_GROW(X, LVL, ERR) \
{ \
/* Check if we need to increase allocation of forward pointers */ \
- if (LVL + 1 >= 1u << X->log_nalloc) { \
+ if (LVL + 1 >= ((size_t)1) << X->log_nalloc) { \
H5SL_node_t **_tmp; \
- HDassert(LVL + 1 == 1U << X->log_nalloc); \
+ HDassert(LVL + 1 == ((size_t)1) << X->log_nalloc); \
/* Double the amount of allocated space */ \
X->log_nalloc++; \
\
@@ -178,7 +178,7 @@
\
/* Create the new factory */ \
H5SL_fac_g[H5SL_fac_nused_g] = \
- H5FL_fac_init((1u << H5SL_fac_nused_g) * sizeof(H5SL_node_t *)); \
+ H5FL_fac_init((((size_t)1) << H5SL_fac_nused_g) * sizeof(H5SL_node_t *)); \
H5SL_fac_nused_g++; \
} \
\
@@ -198,9 +198,9 @@
#define H5SL_SHRINK(X, LVL) \
{ \
/* Check if we can reduce the allocation of forward pointers */ \
- if (LVL <= 1u << (X->log_nalloc - 1)) { \
+ if (LVL <= ((size_t)1) << (X->log_nalloc - 1)) { \
H5SL_node_t **_tmp; \
- HDassert(LVL == 1U << (X->log_nalloc - 1)); \
+ HDassert(LVL == ((size_t)1) << (X->log_nalloc - 1)); \
X->log_nalloc--; \
\
/* Allocate space for new forward pointers */ \