diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2014-03-23 06:27:57 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2014-03-23 06:27:57 (GMT) |
commit | f97d63cb95fa2595e5137a7ac6e0d1282fb5118b (patch) | |
tree | 698d5f3e535b8f77e4ecfb2da9722ab0cb040386 /src/H5I.c | |
parent | 67be45610fd450909038afea54f79e6a91c458cf (diff) | |
download | hdf5-f97d63cb95fa2595e5137a7ac6e0d1282fb5118b.zip hdf5-f97d63cb95fa2595e5137a7ac6e0d1282fb5118b.tar.gz hdf5-f97d63cb95fa2595e5137a7ac6e0d1282fb5118b.tar.bz2 |
[svn-r24869] Description:
Clean up more compiler warnings, plus merge a few Coverity bug fixes from
the hdf5_1_8_coverity branch back to the trunk:
r20877:
Purpose: Fix coverity issue 1723
Description:
Modified test_generate in hl/test_image to close file "f" before exit, even if
an error occurs.
r20879:
Issue 63: change check of return of H5Tget_nmembers to <=0. No need to go
futher if call fails as well as empty.
r20881:
Coverity #659 in Run 46: I changed the Line 442 where it tries to check whether
FLAG_PRINTED is TRUE. But it had just been set to FALSE. I took out the
condition check in the print statement.
Tested on:
Mac OSX/64 10.9.2 (amazon) w/C++, FORTRAN & Parallel
(too minor to require h5committest)
Diffstat (limited to 'src/H5I.c')
-rw-r--r-- | src/H5I.c | 12 |
1 files changed, 5 insertions, 7 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) |