summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5FLprivate.h2
-rw-r--r--src/H5Gprivate.h1
-rw-r--r--src/H5HG.c3
-rw-r--r--src/H5I.c9
-rw-r--r--src/H5Iprivate.h1
-rw-r--r--src/H5Tbit.c2
-rw-r--r--src/H5Tconv.c2
-rw-r--r--src/H5Tvlen.c20
8 files changed, 15 insertions, 25 deletions
diff --git a/src/H5FLprivate.h b/src/H5FLprivate.h
index 59e9ac2..4f3d938 100644
--- a/src/H5FLprivate.h
+++ b/src/H5FLprivate.h
@@ -35,7 +35,7 @@
/* Private headers needed by this file */
/* Macros for turning off free lists in the library */
-#define H5_NO_FREE_LISTS
+/* #define H5_NO_FREE_LISTS */
#ifdef H5_NO_FREE_LISTS
#define H5_NO_REG_FREE_LISTS
#define H5_NO_ARR_FREE_LISTS
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index b2bff6c..2bf2c3f 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -38,7 +38,6 @@
#include "H5private.h" /* Generic Functions */
#include "H5Bprivate.h" /* B-trees */
#include "H5Fprivate.h" /* File access */
-#include "H5Gprivate.h" /* Group */
#include "H5RSprivate.h" /* Reference-counted strings */
/*
diff --git a/src/H5HG.c b/src/H5HG.c
index b6045af..b4b7f17 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -970,9 +970,6 @@ H5HG_remove (H5F_t *f, hid_t dxpl_id, H5HG_t *hobj)
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load heap");
assert (hobj->idx>0 && hobj->idx<heap->nalloc);
-if(!(heap->obj[hobj->idx].begin)) {
- HDfprintf(stderr,"%s: hobj->idx=%d, heap=%p, heap->obj[hobj->idx].begin=%p\n",FUNC,hobj->idx,heap,heap->obj[hobj->idx].begin);
-}
assert (heap->obj[hobj->idx].begin);
obj_start = heap->obj[hobj->idx].begin;
/* Include object header size */
diff --git a/src/H5I.c b/src/H5I.c
index a965ec2..ad2f450 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -117,6 +117,8 @@ H5FL_DEFINE_STATIC(H5I_id_info_t);
/*--------------------- Local function prototypes ---------------------------*/
static herr_t H5I_init_interface(void);
static H5I_id_info_t *H5I_find_id(hid_t id);
+static hid_t H5I_get_file_id(hid_t obj_id);
+static int H5I_get_ref(hid_t id);
#ifdef H5I_DEBUG_OUTPUT
static herr_t H5I_debug(H5I_type_t grp);
#endif /* H5I_DEBUG_OUTPUT */
@@ -842,7 +844,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-hid_t
+static hid_t
H5I_get_file_id(hid_t obj_id)
{
H5G_entry_t *ent;
@@ -1343,11 +1345,8 @@ H5I_find_id(hid_t id)
/* Check arguments */
grp = H5I_GRP(id);
-
- if (grp <= H5I_BADID || grp >= H5I_NGROUPS) {
+ if (grp <= H5I_BADID || grp >= H5I_NGROUPS)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "invalid group number");
- }
-
grp_ptr = H5I_id_group_list_g[grp];
if (grp_ptr == NULL || grp_ptr->count <= 0)
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "invalid group");
diff --git a/src/H5Iprivate.h b/src/H5Iprivate.h
index 42369e3..79819a5 100644
--- a/src/H5Iprivate.h
+++ b/src/H5Iprivate.h
@@ -67,7 +67,6 @@ H5_DLL hid_t H5I_register(H5I_type_t grp, void *object);
H5_DLL void *H5I_object(hid_t id);
H5_DLL void *H5I_object_verify(hid_t id, H5I_type_t id_type);
H5_DLL H5I_type_t H5I_get_type(hid_t id);
-H5_DLL hid_t H5I_get_file_id(hid_t obj_id);
H5_DLL void *H5I_remove(hid_t id);
H5_DLL void *H5I_search(H5I_type_t grp, H5I_search_func_t func, void *key);
H5_DLL int H5I_inc_ref(hid_t id);
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index fae953a..f6e36c7 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -183,14 +183,12 @@ H5T_bit_get_d (uint8_t *buf, size_t offset, size_t size)
hsize_t val=0;
size_t i, hs;
hsize_t ret_value; /* Return value */
- void *pt;
FUNC_ENTER_NOAPI(H5T_bit_get_d, 0);
assert (8*sizeof(val)>=size);
H5T_bit_copy ((uint8_t*)&val, 0, buf, offset, size);
-
switch (((H5T_t*)(H5I_object(H5T_NATIVE_INT_g)))->u.atomic.order) {
case H5T_ORDER_LE:
break;
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 2d043d7..7c7b505 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -2479,12 +2479,12 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
/* Convert VL sequence */
H5_CHECK_OVERFLOW(seq_len,hssize_t,hsize_t);
-
if (H5T_convert(tpath, tsrc_id, tdst_id, (hsize_t)seq_len, 0, 0, conv_buf, tmp_buf, dxpl_id)<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed");
/* Write sequence to destination location */
if((*(dst->u.vlen.write))(dst->u.vlen.f,dxpl_id,d,conv_buf, bg_ptr, (hsize_t)seq_len,(hsize_t)dst_base_size)<0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't write VL data");
/* For nested VL case, free leftover heap objects from the deeper level if the length of new data elements is shorted than the old data elements.*/
H5_CHECK_OVERFLOW(bg_seq_len,hsize_t,hssize_t);
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 057a309..7663fdb 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -818,17 +818,15 @@ H5T_vlen_disk_write(H5F_t *f, hid_t dxpl_id, void *_vl, void *buf, void *_bg, hs
HDmemset(&bg_hobjid,0,sizeof(H5HG_t));
UINT32DECODE(bg, bg_seq_len);
- if(bg_seq_len > 0) {
- /* Get heap information */
- H5F_addr_decode(f, (const uint8_t **)&bg, &(bg_hobjid.addr));
- INT32DECODE(bg, bg_hobjid.idx);
-
- /* Free heap object for old data */
- if(bg_hobjid.addr>0) {
- /* Free heap object */
- if(H5HG_remove(f, dxpl_id, &bg_hobjid)<0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "Unable to remove heap object")
- } /* end if */
+ /* Get heap information */
+ H5F_addr_decode(f, (const uint8_t **)&bg, &(bg_hobjid.addr));
+ INT32DECODE(bg, bg_hobjid.idx);
+
+ /* Free heap object for old data */
+ if(bg_hobjid.addr>0) {
+ /* Free heap object */
+ if(H5HG_remove(f, dxpl_id, &bg_hobjid)<0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "Unable to remove heap object")
} /* end if */
} /* end if */