From e4929ef4e0d112cc065ad333b16cbb59073da24a Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Wed, 7 Jun 2023 06:01:50 -0700 Subject: Fix MSVC 32/64 bit shift conversion warnings (#3067) --- src/H5SL.c | 10 +++++----- 1 file 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 */ \ -- cgit v0.12