diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5I.c | 12 | ||||
-rw-r--r-- | src/H5Odbg.c | 14 | ||||
-rw-r--r-- | src/H5Olink.c | 5 | ||||
-rw-r--r-- | src/H5Zdeflate.c | 2 | ||||
-rw-r--r-- | src/H5Zshuffle.c | 2 |
5 files changed, 19 insertions, 16 deletions
@@ -838,7 +838,6 @@ H5I_register(H5I_type_t type, const void *object, hbool_t app_ref) */ if(type_ptr->wrapped) { H5I_wrap_ud_t udata; /* User data for iteration */ - hid_t previd; /* Previous ID value */ herr_t iter_status; /* Iteration status */ /* Set up user data for iteration */ @@ -1173,7 +1172,7 @@ H5I__remove_common(H5I_id_type_t *type_ptr, hid_t id) HDassert(type_ptr); /* Get the ID node for the ID */ - if(NULL == (curr_id = H5SL_remove(type_ptr->ids, &id))) + if(NULL == (curr_id = (H5I_id_info_t *)H5SL_remove(type_ptr->ids, &id))) HGOTO_ERROR(H5E_ATOM, H5E_CANTDELETE, NULL, "can't remove ID node from skip list") /* (Casting away const OK -QAK) */ @@ -1206,7 +1205,6 @@ void * H5I_remove(hid_t id) { H5I_id_type_t *type_ptr; /*ptr to the atomic type */ - H5I_id_info_t *curr_id; /*ptr to the current atom */ H5I_type_t type; /*atom's atomic type */ void * ret_value; /*return value */ @@ -1304,7 +1302,7 @@ H5I_dec_ref(hid_t id) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number") /* General lookup of the ID */ - if(NULL == (id_ptr = H5SL_search(type_ptr->ids, &id))) + if(NULL == (id_ptr = (H5I_id_info_t *)H5SL_search(type_ptr->ids, &id))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't locate ID") /* @@ -1505,7 +1503,7 @@ H5I_inc_ref(hid_t id, hbool_t app_ref) HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type") /* General lookup of the ID */ - if(NULL == (id_ptr = H5SL_search(type_ptr->ids, &id))) + if(NULL == (id_ptr = (H5I_id_info_t *)H5SL_search(type_ptr->ids, &id))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't locate ID") /* Adjust reference counts */ @@ -1590,7 +1588,7 @@ H5I_get_ref(hid_t id, hbool_t app_ref) HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "invalid type") /* General lookup of the ID */ - if(NULL == (id_ptr = H5SL_search(type_ptr->ids, &id))) + if(NULL == (id_ptr = (H5I_id_info_t *)H5SL_search(type_ptr->ids, &id))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't locate ID") /* Set return value */ @@ -2108,7 +2106,7 @@ H5I__find_id(hid_t id) HGOTO_DONE(NULL); /* Locate the ID node for the ID */ - ret_value = H5SL_search(type_ptr->ids, &id); + ret_value = (H5I_id_info_t *)H5SL_search(type_ptr->ids, &id); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Odbg.c b/src/H5Odbg.c index 5901c61..b91a51a 100644 --- a/src/H5Odbg.c +++ b/src/H5Odbg.c @@ -455,30 +455,32 @@ H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, i hbool_t flag_printed = FALSE; if(oh->mesg[i].flags & H5O_MSG_FLAG_SHARED) { - HDfprintf(stream, "%s%s", (flag_printed ? ", " : "<"), "S"); + HDfprintf(stream, "<S"); flag_printed = TRUE; } /* end if */ if(oh->mesg[i].flags & H5O_MSG_FLAG_CONSTANT) { - HDfprintf(stream, "%s%s", (flag_printed ? ", " : "<"), "C"); + HDfprintf(stream, "%sC", (flag_printed ? ", " : "<")); flag_printed = TRUE; } /* end if */ if(oh->mesg[i].flags & H5O_MSG_FLAG_DONTSHARE) { - HDfprintf(stream, "%s%s", (flag_printed ? ", " : "<"), "DS"); + HDfprintf(stream, "%sDS", (flag_printed ? ", " : "<")); flag_printed = TRUE; } /* end if */ if(oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN) { - HDfprintf(stream, "%s%s", (flag_printed ? ", " : "<"), "FIU"); + HDfprintf(stream, "%sFIU", (flag_printed ? ", " : "<")); flag_printed = TRUE; } /* end if */ if(oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN) { - HDfprintf(stream, "%s%s", (flag_printed ? ", " : "<"), "MIU"); + HDfprintf(stream, "%sMIU", (flag_printed ? ", " : "<")); flag_printed = TRUE; } /* end if */ if(oh->mesg[i].flags & H5O_MSG_FLAG_WAS_UNKNOWN) { HDassert(oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN); - HDfprintf(stream, "%s%s", (flag_printed ? ", " : "<"), "WU"); + HDfprintf(stream, "%sWU", (flag_printed ? ", " : "<")); flag_printed = TRUE; } /* end if */ + if(!flag_printed) + HDfprintf(stream, "-"); HDfprintf(stream, ">\n"); if(oh->mesg[i].flags & ~H5O_MSG_FLAG_BITS) HDfprintf(stream, "%*s%-*s 0x%02x\n", indent + 3,"", MAX(0, fwidth - 3), diff --git a/src/H5Olink.c b/src/H5Olink.c index 4dda5fe..184f6b9 100644 --- a/src/H5Olink.c +++ b/src/H5Olink.c @@ -484,6 +484,9 @@ H5O_link_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg) FUNC_ENTER_NOAPI_NOINIT_NOERR + /* Sanity check */ + HDcompile_assert(sizeof(uint64_t) >= sizeof(size_t)); + /* Get name's length */ name_len = (uint64_t)HDstrlen(lnk->name); @@ -500,7 +503,7 @@ H5O_link_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg) /* Set return value */ ret_value = 1 + /* Version */ 1 + /* Link encoding flags */ - (lnk->type != H5L_TYPE_HARD ? 1 : 0) + /* Link type */ + (lnk->type != H5L_TYPE_HARD ? (size_t)1 : 0) + /* Link type */ (lnk->corder_valid ? 8 : 0) + /* Creation order */ (lnk->cset != H5T_CSET_ASCII ? 1 : 0) + /* Character set */ name_size + /* Name length */ diff --git a/src/H5Zdeflate.c b/src/H5Zdeflate.c index f318c2f..82ad1ba 100644 --- a/src/H5Zdeflate.c +++ b/src/H5Zdeflate.c @@ -51,7 +51,7 @@ const H5Z_class2_t H5Z_DEFLATE[1] = {{ H5Z_filter_deflate, /* The actual filter function */ }}; -#define H5Z_DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s))*1.001)+12) +#define H5Z_DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s)) * (double)1.001f) + 12) /*------------------------------------------------------------------------- diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c index 90509b0..4a67839 100644 --- a/src/H5Zshuffle.c +++ b/src/H5Zshuffle.c @@ -81,7 +81,7 @@ H5Z_set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t UNUSED space_id) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Get datatype */ - if(NULL == (type = H5I_object_verify(type_id, H5I_DATATYPE))) + if(NULL == (type = (const H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") /* Get the filter's current parameters */ |