summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2016-03-24 03:58:43 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2016-03-24 03:58:43 (GMT)
commit9333a2e39c9a496f2a21a97d772493932c3f66d4 (patch)
tree45875ff8c9f35c0020dc5ef5abd6cb8733002d15 /src
parent32f21214bb0215e77c4819be9462e254c4532b85 (diff)
downloadhdf5-9333a2e39c9a496f2a21a97d772493932c3f66d4.zip
hdf5-9333a2e39c9a496f2a21a97d772493932c3f66d4.tar.gz
hdf5-9333a2e39c9a496f2a21a97d772493932c3f66d4.tar.bz2
[svn-r29548] Minor normalization w/ trunk in preparation for big merge.
Tested on: 64-bit Ubuntu 15.10 w/ gcc 5.2.1 autotools serial autotools parallel (MPICH 3.1.4)
Diffstat (limited to 'src')
-rw-r--r--src/H5AC.c2
-rw-r--r--src/H5Apkg.h11
-rw-r--r--src/H5B2.c3
-rw-r--r--src/H5B2int.c14
-rw-r--r--src/H5Cprivate.h4
-rw-r--r--src/H5Dio.c2
-rw-r--r--src/H5Dlayout.c33
-rw-r--r--src/H5Doh.c4
-rw-r--r--src/H5Dpkg.h2
-rw-r--r--src/H5EApkg.h60
-rw-r--r--src/H5EAprivate.h16
-rw-r--r--src/H5F.c1
-rw-r--r--src/H5FA.c2
-rw-r--r--src/H5FAprivate.h2
-rw-r--r--src/H5Fsuper.c2
-rw-r--r--src/H5Fsuper_cache.c2
-rw-r--r--src/H5Gstab.c4
-rw-r--r--src/H5HG.c24
-rw-r--r--src/H5HGpkg.h6
-rw-r--r--src/H5MF.c2
-rw-r--r--src/H5Oainfo.c6
-rw-r--r--src/H5Oalloc.c16
-rw-r--r--src/H5Ocache.c1
-rw-r--r--src/H5Ochunk.c8
-rw-r--r--src/H5Olayout.c72
-rw-r--r--src/Makefile.am2
26 files changed, 153 insertions, 148 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 6cd3b0e..64edc87 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -32,7 +32,7 @@
/****************/
#include "H5ACmodule.h" /* This source code file is part of the H5AC module */
-#define H5F_FRIEND /*suppress error about including H5Fpkg */
+#define H5F_FRIEND /* Suppress error about including H5Fpkg */
/***********/
diff --git a/src/H5Apkg.h b/src/H5Apkg.h
index b392497..5858147 100644
--- a/src/H5Apkg.h
+++ b/src/H5Apkg.h
@@ -220,15 +220,15 @@ H5_DLL herr_t H5A_dense_iterate(H5F_t *f, hid_t dxpl_id, hid_t loc_id,
const H5O_ainfo_t *ainfo, H5_index_t idx_type, H5_iter_order_t order,
hsize_t skip, hsize_t *last_attr, const H5A_attr_iter_op_t *attr_op,
void *op_data);
-H5_DLL herr_t H5A_dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- const char *name);
-H5_DLL herr_t H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n);
+H5_DLL herr_t H5A_dense_remove(H5F_t *f, hid_t dxpl_id,
+ const H5O_ainfo_t *ainfo, const char *name);
+H5_DLL herr_t H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id,
+ const H5O_ainfo_t *ainfo, H5_index_t idx_type, H5_iter_order_t order,
+ hsize_t n);
H5_DLL htri_t H5A_dense_exists(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
const char *name);
H5_DLL herr_t H5A_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo);
-
/* Attribute table operations */
H5_DLL herr_t H5A_compact_build_table(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
H5_index_t idx_type, H5_iter_order_t order, H5A_attr_table_t *atable);
@@ -267,7 +267,6 @@ H5_DLL herr_t H5A_attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *me
H5_DLL herr_t H5A_dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t * ainfo_src,
H5O_loc_t *dst_oloc, H5O_ainfo_t *ainfo_dst, hid_t dxpl_id, H5O_copy_t *cpy_info);
-
/* Testing functions */
#ifdef H5A_TESTING
H5_DLL htri_t H5A_is_shared_test(hid_t aid);
diff --git a/src/H5B2.c b/src/H5B2.c
index caf2395..5cbeadd 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -535,11 +535,10 @@ H5B2_find(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_found_t op,
/* Unlock current node before failing */
H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr.addr, internal, H5AC__NO_FLAGS_SET);
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
- }
+ } /* end if */
if(cmp > 0)
idx++;
-
if(cmp != 0) {
/* Get node pointer for next node to search */
next_node_ptr=internal->node_ptrs[idx];
diff --git a/src/H5B2int.c b/src/H5B2int.c
index a184b4b..8bdde3e 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -148,14 +148,14 @@ H5B2__locate_record(const H5B2_class_t *type, unsigned nrec, size_t *rec_off,
hi = nrec;
while(lo < hi && *cmp) {
- my_idx = (lo + hi) / 2;
- if((type->compare)(udata, native + rec_off[my_idx], cmp) < 0)
+ my_idx = (lo + hi) / 2;
+ if((type->compare)(udata, native + rec_off[my_idx], cmp) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOMPARE, FAIL, "can't compare btree2 records")
- if(*cmp < 0)
- hi = my_idx;
- else
- lo = my_idx + 1;
- }
+ if(*cmp < 0)
+ hi = my_idx;
+ else
+ lo = my_idx + 1;
+ } /* end while */
*idx = my_idx;
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 5502e9f..a062214 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -41,8 +41,8 @@
/**************************/
/* Cache configuration settings */
-#define H5C__MAX_NUM_TYPE_IDS 28
-#define H5C__PREFIX_LEN 32
+#define H5C__MAX_NUM_TYPE_IDS 28
+#define H5C__PREFIX_LEN 32
/* This sanity checking constant was picked out of the air. Increase
* or decrease it if appropriate. Its purposes is to detect corrupt
diff --git a/src/H5Dio.c b/src/H5Dio.c
index ae42702..7b3f553 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -760,7 +760,7 @@ H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
else
full_overwrite = (hbool_t)((hsize_t)file_nelmts == nelmts ? TRUE : FALSE);
- /* Allocate storage */
+ /* Allocate storage */
if(H5D__alloc_storage(&io_info, H5D_ALLOC_WRITE, full_overwrite, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage")
} /* end if */
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index e61dae0..bbaa9c5 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -23,10 +23,10 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5HLprivate.h" /* Local heaps */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5HLprivate.h" /* Local heaps */
/****************/
@@ -61,15 +61,15 @@
/*-------------------------------------------------------------------------
- * Function: H5D__layout_set_io_ops
+ * Function: H5D__layout_set_io_ops
*
- * Purpose: Set the I/O operation function pointers for a dataset,
+ * Purpose: Set the I/O operation function pointers for a dataset,
* according to the dataset's layout
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Thursday, March 20, 2008
+ * Programmer: Quincey Koziol
+ * Thursday, March 20, 2008
*
*-------------------------------------------------------------------------
*/
@@ -192,15 +192,15 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D__layout_oh_create
+ * Function: H5D__layout_oh_create
*
- * Purpose: Create layout/pline/efl information for dataset
+ * Purpose: Create layout/pline/efl information for dataset
*
- * Return: Success: SUCCEED
- * Failure: FAIL
+ * Return: Success: SUCCEED
+ * Failure: FAIL
*
- * Programmer: Quincey Koziol
- * Monday, July 27, 2009
+ * Programmer: Quincey Koziol
+ * Monday, July 27, 2009
*
*-------------------------------------------------------------------------
*/
@@ -209,7 +209,7 @@ H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
hid_t dapl_id)
{
H5O_layout_t *layout; /* Dataset's layout information */
- const H5O_fill_t *fill_prop; /* Pointer to dataset's fill value information */
+ const H5O_fill_t *fill_prop; /* Pointer to dataset's fill value information */
hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
herr_t ret_value = SUCCEED; /* Return value */
@@ -394,6 +394,7 @@ H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t
/* Adjust chunk dimensions to omit datatype size (in last dimension) for creation property */
if(H5D_CHUNKED == dataset->shared->layout.type)
dataset->shared->layout.u.chunk.ndims--;
+
/* Copy layout to the DCPL */
if(H5P_set(plist, H5D_CRT_LAYOUT_NAME, &dataset->shared->layout) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set layout")
diff --git a/src/H5Doh.c b/src/H5Doh.c
index 8b70362..54f7a5e 100644
--- a/src/H5Doh.c
+++ b/src/H5Doh.c
@@ -465,11 +465,11 @@ H5O__dset_flush(H5G_loc_t *obj_loc, hid_t dxpl_id)
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset")
if(H5D__flush_real(dset, dxpl_id) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush cached dataset info")
+ HDONE_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush cached dataset info")
done:
if(dset && H5D_close(dset) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__dset_flush() */
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index bc04300..2629008 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -544,8 +544,8 @@ H5_DLL herr_t H5D__check_filters(H5D_t *dataset);
H5_DLL herr_t H5D__set_extent(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id);
H5_DLL herr_t H5D__get_dxpl_cache(hid_t dxpl_id, H5D_dxpl_cache_t **cache);
H5_DLL herr_t H5D__flush_sieve_buf(H5D_t *dataset, hid_t dxpl_id);
-H5_DLL herr_t H5D__mark(const H5D_t *dataset, hid_t dxpl_id, unsigned flags);
H5_DLL herr_t H5D__flush_real(H5D_t *dataset, hid_t dxpl_id);
+H5_DLL herr_t H5D__mark(const H5D_t *dataset, hid_t dxpl_id, unsigned flags);
#ifdef H5_DEBUG_BUILD
H5_DLL herr_t H5D_set_io_info_dxpls(H5D_io_info_t *io_info, hid_t dxpl_id);
#endif /* H5_DEBUG_BUILD */
diff --git a/src/H5EApkg.h b/src/H5EApkg.h
index 3af1b2c..2e13694 100644
--- a/src/H5EApkg.h
+++ b/src/H5EApkg.h
@@ -14,12 +14,12 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
- * Tuesday, June 17, 2008
+ * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Tuesday, June 17, 2008
*
- * Purpose: This file contains declarations which are visible only within
- * the H5EA package. Source files outside the H5EA package should
- * include H5EAprivate.h instead.
+ * Purpose: This file contains declarations which are visible only
+ * within the H5EA package. Source files outside the H5EA
+ * package should include H5EAprivate.h instead.
*/
#if !(defined(H5EA_FRIEND) | defined(H5EA_MODULE))
#error "Do not include this file outside the H5EA package!"
@@ -32,7 +32,7 @@
#include "H5EAprivate.h"
/* Other private headers needed by this file */
-#include "H5FLprivate.h" /* Free Lists */
+#include "H5FLprivate.h" /* Free Lists */
/**************************/
@@ -95,10 +95,10 @@
/* General metadata fields */ \
H5EA_METADATA_PREFIX_SIZE(TRUE) \
\
- /* Sanity-checking fields */ \
+ /* Sanity-checking fields */ \
+ (i)->hdr->sizeof_addr /* File address of array owning the block */ \
\
- /* Extensible Array Index Block specific fields */ \
+ /* Extensible Array Index Block specific fields */ \
+ ((size_t)(i)->hdr->cparam.idx_blk_elmts * (size_t)(i)->hdr->cparam.raw_elmt_size) /* Elements in index block */ \
+ ((i)->ndblk_addrs * (i)->hdr->sizeof_addr) /* Data block addresses in index block */ \
+ ((i)->nsblk_addrs * (i)->hdr->sizeof_addr) /* Super block addresses in index block */ \
@@ -109,31 +109,31 @@
/* General metadata fields */ \
H5EA_METADATA_PREFIX_SIZE(TRUE) \
\
- /* Sanity-checking fields */ \
+ /* Sanity-checking fields */ \
+ (s)->hdr->sizeof_addr /* File address of array owning the block */ \
+ (s)->hdr->arr_off_size /* Offset of the block in the array */ \
\
- /* Extensible Array Super Block specific fields */ \
+ /* Extensible Array Super Block specific fields */ \
+ ((s)->ndblks * (s)->dblk_page_init_size) /* Data block 'page init' bitmasks in super block (can be 0 if no pages) */ \
+ ((s)->ndblks * (s)->hdr->sizeof_addr) /* Data block addresses in super block */ \
)
/* Size of the extensible array data block prefix on disk */
-#define H5EA_DBLOCK_PREFIX_SIZE(d) ( \
+#define H5EA_DBLOCK_PREFIX_SIZE(d) ( \
/* General metadata fields */ \
H5EA_METADATA_PREFIX_SIZE(TRUE) \
\
- /* Sanity-checking fields */ \
+ /* Sanity-checking fields */ \
+ (d)->hdr->sizeof_addr /* File address of array owning the block */ \
+ (d)->hdr->arr_off_size /* Offset of the block in the array */ \
)
/* Size of the extensible array data block on disk */
-#define H5EA_DBLOCK_SIZE(d) ( \
+#define H5EA_DBLOCK_SIZE(d) ( \
/* Data block prefix size */ \
H5EA_DBLOCK_PREFIX_SIZE(d) \
\
- /* Extensible Array Data Block specific fields */ \
+ /* Extensible Array Data Block specific fields */ \
+ ((d)->nelmts * (size_t)(d)->hdr->cparam.raw_elmt_size) /* Elements in data block */ \
+ ((d)->npages * H5EA_SIZEOF_CHKSUM) /* Checksum for each page */ \
)
@@ -219,9 +219,9 @@ typedef struct H5EA_iblock_t {
haddr_t *sblk_addrs; /* Buffer for addresses of super blocks in index block */
/* Internal array information (not stored) */
- H5EA_hdr_t *hdr; /* Shared array header info */
- haddr_t addr; /* Address of this index block on disk */
- size_t size; /* Size of index block on disk */
+ H5EA_hdr_t *hdr; /* Shared array header info */
+ haddr_t addr; /* Address of this index block on disk */
+ size_t size; /* Size of index block on disk */
/* Computed/cached values (not stored) */
size_t nsblks; /* # of super blocks whose data block addresses are in index block */
@@ -240,10 +240,10 @@ typedef struct H5EA_sblock_t {
uint8_t *page_init; /* Bitmap of whether a data block page is initialized */
/* Internal array information (not stored) */
- H5EA_hdr_t *hdr; /* Shared array header info */
- H5EA_iblock_t *parent; /* Parent object for super block (index block) */
- haddr_t addr; /* Address of this index block on disk */
- size_t size; /* Size of index block on disk */
+ H5EA_hdr_t *hdr; /* Shared array header info */
+ H5EA_iblock_t *parent; /* Parent object for super block (index block) */
+ haddr_t addr; /* Address of this index block on disk */
+ size_t size; /* Size of index block on disk */
/* Computed/cached values (not stored) */
unsigned idx; /* Super block index within the extensible array */
@@ -264,10 +264,10 @@ typedef struct H5EA_dblock_t {
void *elmts; /* Buffer for elements stored in data block */
/* Internal array information (not stored) */
- H5EA_hdr_t *hdr; /* Shared array header info */
- void *parent; /* Parent object for data block (index or super block) */
- haddr_t addr; /* Address of this data block on disk */
- size_t size; /* Size of data block on disk */
+ H5EA_hdr_t *hdr; /* Shared array header info */
+ void *parent; /* Parent object for data block (index or super block) */
+ haddr_t addr; /* Address of this data block on disk */
+ size_t size; /* Size of data block on disk */
/* Computed/cached values (not stored) */
size_t nelmts; /* Number of elements in block */
@@ -283,10 +283,10 @@ typedef struct H5EA_dbk_page_t {
void *elmts; /* Buffer for elements stored in data block page */
/* Internal array information (not stored) */
- H5EA_hdr_t *hdr; /* Shared array header info */
- H5EA_sblock_t *parent; /* Parent object for data block page (super block) */
- haddr_t addr; /* Address of this data block page on disk */
- size_t size; /* Size of data block page on disk */
+ H5EA_hdr_t *hdr; /* Shared array header info */
+ H5EA_sblock_t *parent; /* Parent object for data block page (super block) */
+ haddr_t addr; /* Address of this data block page on disk */
+ size_t size; /* Size of data block page on disk */
/* Computed/cached values (not stored) */
/* <none> */
@@ -360,7 +360,7 @@ H5_DLLVAR const H5AC_class_t H5AC_EARRAY_DBLK_PAGE[1];
H5_DLLVAR const H5EA_class_t H5EA_CLS_TEST[1];
/* Array of extensible array client ID -> client class mappings */
-extern const H5EA_class_t *const H5EA_client_class_g[H5EA_NUM_CLS_ID];
+H5_DLLVAR const H5EA_class_t *const H5EA_client_class_g[H5EA_NUM_CLS_ID];
/******************************/
diff --git a/src/H5EAprivate.h b/src/H5EAprivate.h
index 6ce3062..33b4553 100644
--- a/src/H5EAprivate.h
+++ b/src/H5EAprivate.h
@@ -15,12 +15,12 @@
/*-------------------------------------------------------------------------
*
- * Created: H5EAprivate.h
- * Jun 17 2008
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5EAprivate.h
+ * Jun 17 2008
+ * Quincey Koziol <koziol@hdfgroup.org>
*
- * Purpose: Private header for library accessible extensible
- * array routines.
+ * Purpose: Private header for library accessible extensible
+ * array routines.
*
*-------------------------------------------------------------------------
*/
@@ -34,8 +34,8 @@
#endif /* NOT_YET */
/* Private headers needed by this file */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5Fprivate.h" /* File access */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5Fprivate.h" /* File access */
/**************************/
@@ -51,7 +51,7 @@
typedef enum H5EA_cls_id_t {
/* Start real class IDs at 0 -QAK */
/* (keep these last) */
- H5EA_CLS_TEST_ID, /* Extensible array is for testing (do not use for actual data) */
+ H5EA_CLS_TEST_ID, /* Extensible array is for testing (do not use for actual data) */
H5EA_NUM_CLS_ID /* Number of Extensible Array class IDs (must be last) */
} H5EA_cls_id_t;
diff --git a/src/H5F.c b/src/H5F.c
index 95d87fc..bf57daf 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -58,7 +58,6 @@
/********************/
-
/*********************/
/* Package Variables */
/*********************/
diff --git a/src/H5FA.c b/src/H5FA.c
index 1be3f2e..3e502c0 100644
--- a/src/H5FA.c
+++ b/src/H5FA.c
@@ -79,7 +79,7 @@ hbool_t H5_PKG_INIT_VAR = FALSE;
* client class..
*/
const H5FA_class_t *const H5FA_client_class_g[] = {
- H5FA_CLS_TEST, /* ? - H5FA_CLS_TEST_ID */
+ H5FA_CLS_TEST, /* ? - H5FA_CLS_TEST_ID */
};
diff --git a/src/H5FAprivate.h b/src/H5FAprivate.h
index aa88003..dfc73f5 100644
--- a/src/H5FAprivate.h
+++ b/src/H5FAprivate.h
@@ -32,7 +32,7 @@
#endif /* NOT_YET */
/* Private headers needed by this file */
-#include "H5Fprivate.h" /* File access */
+#include "H5Fprivate.h" /* File access */
/**************************/
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index 6b4613d..70d1a49 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -115,7 +115,7 @@ H5F_super_ext_create(H5F_t *f, hid_t dxpl_id, H5O_loc_t *ext_ptr)
* extension.
*/
H5O_loc_reset(ext_ptr);
- if(H5O_create(f, dxpl_id, 0, (size_t)1, H5P_GROUP_CREATE_DEFAULT, ext_ptr) < 0)
+ if(H5O_create(f, dxpl_id, (size_t)0, (size_t)1, H5P_GROUP_CREATE_DEFAULT, ext_ptr) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "unable to create superblock extension")
/* Record the address of the superblock extension */
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index 1e9e4dd..f445303 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -195,7 +195,7 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata,
H5F_super_t *sblock = NULL; /* File's superblock */
H5F_superblock_cache_ud_t *udata = (H5F_superblock_cache_ud_t *)_udata; /* User data */
const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
- size_t variable_size; /* Sariable size of superblock */
+ size_t variable_size; /* Variable size of superblock */
unsigned super_vers; /* Superblock version */
uint8_t sizeof_addr; /* Size of offsets in the file (in bytes) */
uint8_t sizeof_size; /* Size of lengths in the file (in bytes) */
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index 3a7cd9e..ed3dd84 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -153,10 +153,10 @@ H5G__stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t
/* Create the B-tree */
if(H5B_create(f, dxpl_id, H5B_SNODE, NULL, &(stab->btree_addr)/*out*/) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create B-tree")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create B-tree")
/* Create symbol table private heap */
- if(FAIL == H5HL_create(f, dxpl_id, size_hint, &(stab->heap_addr)/*out*/))
+ if(H5HL_create(f, dxpl_id, size_hint, &(stab->heap_addr)/*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create heap")
/* Pin the heap down in memory */
diff --git a/src/H5HG.c b/src/H5HG.c
index de25bc6..f95b607 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -297,9 +297,9 @@ done:
static size_t
H5HG_alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
{
- size_t idx;
- uint8_t *p;
- size_t need = H5HG_SIZEOF_OBJHDR(f) + H5HG_ALIGN(size);
+ size_t idx;
+ uint8_t *p;
+ size_t need = H5HG_SIZEOF_OBJHDR(f) + H5HG_ALIGN(size);
size_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -358,11 +358,11 @@ H5HG_alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
/* Fix the free space object */
if(need == heap->obj[0].size) {
- /*
- * All free space has been exhausted from this collection.
- */
- heap->obj[0].size = 0;
- heap->obj[0].begin = NULL;
+ /*
+ * All free space has been exhausted from this collection.
+ */
+ heap->obj[0].size = 0;
+ heap->obj[0].begin = NULL;
} /* end if */
else if(heap->obj[0].size-need >= H5HG_SIZEOF_OBJHDR (f)) {
/*
@@ -785,10 +785,10 @@ done:
herr_t
H5HG_remove (H5F_t *f, hid_t dxpl_id, H5HG_t *hobj)
{
- H5HG_heap_t *heap = NULL;
- uint8_t *p = NULL, *obj_start = NULL;
- size_t need;
- unsigned u;
+ H5HG_heap_t *heap = NULL;
+ uint8_t *p = NULL, *obj_start = NULL;
+ size_t need;
+ unsigned u;
unsigned flags = H5AC__NO_FLAGS_SET;/* Whether the heap gets deleted */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5HGpkg.h b/src/H5HGpkg.h
index ffbf7c6..e566ece 100644
--- a/src/H5HGpkg.h
+++ b/src/H5HGpkg.h
@@ -116,9 +116,9 @@ H5FL_BLK_EXTERN(gheap_chunk);
/****************************/
typedef struct H5HG_obj_t {
- int nrefs; /*reference count */
- size_t size; /*total size of object */
- uint8_t *begin; /*ptr to object into heap->chunk*/
+ int nrefs; /* reference count */
+ size_t size; /* total size of object */
+ uint8_t *begin; /* ptr to object into heap->chunk */
} H5HG_obj_t;
/* Forward declarations for fields */
diff --git a/src/H5MF.c b/src/H5MF.c
index 00a1ed8..15e7a96 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -1032,7 +1032,7 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, haddr_t addr,
H5MF_sect_ud_t udata; /* User data for callback */
H5P_genplist_t *dxpl = NULL; /* DXPL for setting ring */
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
- htri_t ret_value = FAIL; /* Return value */
+ htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
#ifdef H5MF_ALLOC_DEBUG
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c
index c5f692d..ab26c17 100644
--- a/src/H5Oainfo.c
+++ b/src/H5Oainfo.c
@@ -346,9 +346,11 @@ H5O_ainfo_delete(H5F_t *f, hid_t dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, void *_
HDassert(ainfo);
/* If the object is using "dense" attribute storage, delete it */
- if(H5F_addr_defined(ainfo->fheap_addr))
+ if(H5F_addr_defined(ainfo->fheap_addr)) {
+ /* Delete the attribute */
if(H5A_dense_delete(f, dxpl_id, ainfo) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free dense attribute storage")
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -428,7 +430,7 @@ H5O_ainfo_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
*ainfo_dst = *ainfo_src;
if(H5F_addr_defined(ainfo_src->fheap_addr)) {
- /* copy dense attribute */
+ /* Prepare to copy dense attributes - actual copy in post_copy */
/* Set copied metadata tag */
H5_BEGIN_TAG(dxpl_id, H5AC__COPIED_TAG, NULL);
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index 3d930f0..99f1322 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -921,7 +921,7 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new
oh->chunk = x;
} /* end if */
- chunkno = oh->nchunks++;
+ chunkno = (unsigned)oh->nchunks++;
oh->chunk[chunkno].addr = new_chunk_addr;
oh->chunk[chunkno].size = size;
oh->chunk[chunkno].gap = 0;
@@ -966,6 +966,8 @@ H5O_alloc_new_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t size, size_t *new
oh->nmesgs--;
} /* end if */
else {
+ HDassert(curr_msg->type->id != H5O_CONT_ID);
+
/* Copy the raw data */
HDmemcpy(p, curr_msg->raw - (size_t)H5O_SIZEOF_MSGHDR_OH(oh),
curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
@@ -1544,13 +1546,13 @@ H5O_move_msgs_forward(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
if(H5O_CONT_ID == curr_msg->type->id) {
htri_t status; /* Status from moving messages */
- if((status = H5O_move_cont(f, dxpl_id, oh, u)) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "Error in moving messages into cont message")
- else if(status > 0) { /* Message(s) got moved into "continuation" message */
+ if((status = H5O_move_cont(f, dxpl_id, oh, u)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "Error in moving messages into cont message")
+ else if(status > 0) { /* Message(s) got moved into "continuation" message */
packed_msg = TRUE;
- break;
- } /* end else-if */
- } /* end if */
+ break;
+ } /* end else-if */
+ } /* end if */
/* Don't let locked messages be moved into earlier chunk */
if(!curr_msg->locked) {
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index f74966e..e085242 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -158,7 +158,6 @@ H5FL_SEQ_DEFINE(H5O_cont_t);
/* Local Variables */
/*******************/
-
/*-------------------------------------------------------------------------
* Function: H5O__cache_get_load_size()
diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c
index 8abe660..18561b3 100644
--- a/src/H5Ochunk.c
+++ b/src/H5Ochunk.c
@@ -95,7 +95,7 @@ H5FL_DEFINE(H5O_chunk_proxy_t);
herr_t
H5O_chunk_add(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
{
- H5O_chunk_proxy_t *chk_proxy = NULL; /* Proxy for chunk, to mark it dirty in the cache */
+ H5O_chunk_proxy_t *chk_proxy = NULL; /* Proxy for chunk, to mark it dirty in the cache */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_TAG(dxpl_id, oh->cache_info.addr, FAIL)
@@ -121,6 +121,7 @@ H5O_chunk_add(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
/* Insert the chunk proxy into the cache */
if(H5AC_insert_entry(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header chunk")
+
chk_proxy = NULL;
done:
@@ -372,6 +373,7 @@ H5O_chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
{
H5O_chunk_proxy_t *chk_proxy; /* Proxy for chunk, to mark it dirty in the cache */
H5O_chk_cache_ud_t chk_udata; /* User data for loading chunk */
+ unsigned cache_flags = H5AC__DELETED_FLAG; /* Flags for unprotecting proxy */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_TAG(dxpl_id, oh->cache_info.addr, FAIL)
@@ -397,8 +399,10 @@ H5O_chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
HDassert(chk_proxy->oh == oh);
HDassert(chk_proxy->chunkno == idx);
+ cache_flags |= H5AC__DIRTIED_FLAG | H5AC__FREE_FILE_SPACE_FLAG;
+
/* Release the chunk proxy from the cache, marking it deleted */
- if(H5AC_unprotect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, (H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG)) < 0)
+ if(H5AC_unprotect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, cache_flags) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk")
done:
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 4e8aafb..31ddb88 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -19,18 +19,18 @@
* Purpose: Messages related to data layout.
*/
-#define H5D_FRIEND /*suppress error about including H5Dpkg */
+#define H5D_FRIEND /*suppress error about including H5Dpkg */
#include "H5Omodule.h" /* This source code file is part of the H5O module */
-#include "H5private.h" /* Generic Functions */
-#include "H5Dpkg.h" /* Dataset functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5MFprivate.h" /* File space management */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Opkg.h" /* Object headers */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Dataset functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5MFprivate.h" /* File space management */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Opkg.h" /* Object headers */
+#include "H5Pprivate.h" /* Property lists */
/* Local macros */
@@ -52,31 +52,31 @@ static herr_t H5O__layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
static void *H5O__layout_copy_file(H5F_t *file_src, void *mesg_src,
H5F_t *file_dst, hbool_t *recompute_size, unsigned *mesg_flags,
H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
-static herr_t H5O__layout_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream,
- int indent, int fwidth);
+static herr_t H5O__layout_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg,
+ FILE * stream, int indent, int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_LAYOUT[1] = {{
- H5O_LAYOUT_ID, /*message id number */
- "layout", /*message name for debugging */
- sizeof(H5O_layout_t), /*native message size */
- 0, /* messages are sharable? */
- H5O__layout_decode, /*decode message */
- H5O__layout_encode, /*encode message */
- H5O__layout_copy, /*copy the native value */
- H5O__layout_size, /*size of message on disk */
- H5O__layout_reset, /*reset method */
- H5O__layout_free, /*free the struct */
- H5O__layout_delete, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- NULL, /* pre copy native value to file */
- H5O__layout_copy_file, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O__layout_debug /*debug the message */
+ H5O_LAYOUT_ID, /* message id number */
+ "layout", /* message name for debugging */
+ sizeof(H5O_layout_t), /* native message size */
+ 0, /* messages are sharable? */
+ H5O__layout_decode, /* decode message */
+ H5O__layout_encode, /* encode message */
+ H5O__layout_copy, /* copy the native value */
+ H5O__layout_size, /* size of message on disk */
+ H5O__layout_reset, /* reset method */
+ H5O__layout_free, /* free the struct */
+ H5O__layout_delete, /* file delete method */
+ NULL, /* link method */
+ NULL, /* set share method */
+ NULL, /* can share method */
+ NULL, /* pre copy native value to file */
+ H5O__layout_copy_file, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O__layout_debug /* debug the message */
}};
@@ -740,14 +740,14 @@ H5O__layout_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const vo
/*-------------------------------------------------------------------------
- * Function: H5O__layout_reset
+ * Function: H5O__layout_reset
*
- * Purpose: Frees resources within a data type message, but doesn't free
- * the message itself.
+ * Purpose: Frees resources within a data type message, but doesn't free
+ * the message itself.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, September 13, 2002
*
*-------------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index d6a5909..9f748bf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -126,7 +126,7 @@ include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5vers
H5Cpublic.h H5Dpublic.h \
H5Epubgen.h H5Epublic.h H5Fpublic.h \
H5FDpublic.h H5FDcore.h H5FDdirect.h \
- H5FDfamily.h H5FDlog.h H5FDmpi.h H5FDmpio.h \
+ H5FDfamily.h H5FDlog.h H5FDmpi.h H5FDmpio.h \
H5FDmulti.h H5FDsec2.h H5FDstdio.h \
H5Gpublic.h H5Ipublic.h H5Lpublic.h \
H5MMpublic.h H5Opublic.h H5Ppublic.h \