diff --git a/src/H5B.c b/src/H5B.c index 22ce04c2580..631cefce4ba 100644 --- a/src/H5B.c +++ b/src/H5B.c @@ -1049,7 +1049,8 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type, uint8 *------------------------------------------------------------------------- */ static herr_t -H5B__iterate_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, int exp_level, H5B_operator_t op, void *udata) +H5B__iterate_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, int exp_level, H5B_operator_t op, + void *udata) { H5B_t *bt = NULL; /* Pointer to current B-tree node */ H5UC_t *rc_shared; /* Ref-counted shared info */ @@ -1086,7 +1087,7 @@ H5B__iterate_helper(H5F_t *f, const H5B_class_t *type, haddr_t addr, int exp_lev /* Iterate over node's children */ for (u = 0; u < bt->nchildren && ret_value == H5_ITER_CONT; u++) { if (bt->level > 0) - ret_value = H5B__iterate_helper(f, type, bt->child[u], (int)bt->level-1, op, udata); + ret_value = H5B__iterate_helper(f, type, bt->child[u], (int)(bt->level - 1), op, udata); else ret_value = (*op)(f, H5B_NKEY(bt, shared, u), bt->child[u], H5B_NKEY(bt, shared, u + 1), udata); if (ret_value < 0) diff --git a/src/H5Bcache.c b/src/H5Bcache.c index e6653e03577..a832425c78b 100644 --- a/src/H5Bcache.c +++ b/src/H5Bcache.c @@ -173,8 +173,7 @@ H5B__cache_deserialize(const void *_image, size_t len, void *_udata, bool H5_ATT /* Check in case of level is corrupted, if expected level is known */ if (udata->exp_level != H5B_UNKNOWN_NODELEVEL) if (bt->level != (unsigned)udata->exp_level) - HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, - "level is not as expected, possibly corrupted"); + HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "level is not as expected, possibly corrupted"); /* Entries used */ if (H5_IS_BUFFER_OVERFLOW(image, 2, p_end)) diff --git a/src/H5Bpkg.h b/src/H5Bpkg.h index 169b8c99667..b56a6f3a7e9 100644 --- a/src/H5Bpkg.h +++ b/src/H5Bpkg.h @@ -42,7 +42,7 @@ /* Indicates that the level of the current node is unknown. When the level * is known, it can be used to detect corrupted level during decoding */ -#define H5B_UNKNOWN_NODELEVEL (int)-1 +#define H5B_UNKNOWN_NODELEVEL -1 /****************************/ /* Package Private Typedefs */