summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-07-11 21:01:08 (GMT)
committerGitHub <noreply@github.com>2022-07-11 21:01:08 (GMT)
commitdae60641036f73c64f3592317405550246464be5 (patch)
tree618676b610acbf006f1b17c8d151984e952240fa /src
parentb9d1d66ab84b492691d3c73e71b1374a7da19e50 (diff)
downloadhdf5-dae60641036f73c64f3592317405550246464be5.zip
hdf5-dae60641036f73c64f3592317405550246464be5.tar.gz
hdf5-dae60641036f73c64f3592317405550246464be5.tar.bz2
Fixes for warnings identified by MSVC (#1874)
* Fixes for warnings identified by MSVC * Committing clang-format changes * Moves the casts in H5Binternal.c to the other side Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/H5B2internal.c18
-rw-r--r--src/H5FDsec2.c5
2 files changed, 10 insertions, 13 deletions
diff --git a/src/H5B2internal.c b/src/H5B2internal.c
index c5e7c30..754083d 100644
--- a/src/H5B2internal.c
+++ b/src/H5B2internal.c
@@ -637,26 +637,26 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
if (idx == 0) { /* Left-most child */
/* Check for left-most child and its neighbor being close to full */
if ((internal->node_ptrs[idx].node_nrec + internal->node_ptrs[idx + 1].node_nrec) >=
- ((hdr->node_info[depth - 1].split_nrec * 2) - 1))
+ (unsigned)((hdr->node_info[depth - 1].split_nrec * 2) - 1))
could_split = TRUE;
- } /* end if */
+ }
else if (idx == internal->nrec) { /* Right-most child */
/* Check for right-most child and its neighbor being close to full */
if ((internal->node_ptrs[idx - 1].node_nrec + internal->node_ptrs[idx].node_nrec) >=
- ((hdr->node_info[depth - 1].split_nrec * 2) - 1))
+ (unsigned)((hdr->node_info[depth - 1].split_nrec * 2) - 1))
could_split = TRUE;
- } /* end else-if */
+ }
else { /* Middle child */
/* Check for middle child and its left neighbor being close to full */
if ((internal->node_ptrs[idx - 1].node_nrec + internal->node_ptrs[idx].node_nrec) >=
- ((hdr->node_info[depth - 1].split_nrec * 2) - 1))
+ (unsigned)((hdr->node_info[depth - 1].split_nrec * 2) - 1))
could_split = TRUE;
/* Check for middle child and its right neighbor being close to full */
else if ((internal->node_ptrs[idx].node_nrec +
internal->node_ptrs[idx + 1].node_nrec) >=
- ((hdr->node_info[depth - 1].split_nrec * 2) - 1))
+ (unsigned)((hdr->node_info[depth - 1].split_nrec * 2) - 1))
could_split = TRUE;
- } /* end if */
+ }
/* If this node is full and the child node insertion could
* cause a split, punt back up to caller, leaving the
@@ -672,8 +672,8 @@ H5B2__update_internal(H5B2_hdr_t *hdr, uint16_t depth, unsigned *parent_cache_in
/* Punt back to caller */
HGOTO_DONE(SUCCEED);
- } /* end if */
- } /* end if */
+ }
+ }
/* Release the internal B-tree node */
if (H5AC_unprotect(hdr->f, H5AC_BT2_INT, curr_node_ptr->addr, internal, internal_flags) < 0)
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index e83411c..c4dc100 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -1075,16 +1075,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD__sec2_ctl(H5FD_t *_file, uint64_t H5_ATTR_UNUSED op_code, uint64_t flags,
+H5FD__sec2_ctl(H5FD_t H5_ATTR_UNUSED *_file, uint64_t H5_ATTR_UNUSED op_code, uint64_t flags,
const void H5_ATTR_UNUSED *input, void H5_ATTR_UNUSED **output)
{
herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
- /* Sanity checks */
- HDassert(_file);
-
/* No op codes are understood. */
if (flags & H5FD_CTL_FAIL_IF_UNKNOWN_FLAG)
HGOTO_ERROR(H5E_VFL, H5E_FCNTL, FAIL, "unknown op_code and fail if unknown flag is set")