diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2020-06-01 18:10:17 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2020-06-01 18:10:17 (GMT) |
commit | aa279ebd1669761f6b37146125dd1fcc0cf99431 (patch) | |
tree | 07a564371136f63e091acb4802ac3d7306329fbd | |
parent | 6468a613fd14570a29bb54c0437bbc087f770621 (diff) | |
download | hdf5-aa279ebd1669761f6b37146125dd1fcc0cf99431.zip hdf5-aa279ebd1669761f6b37146125dd1fcc0cf99431.tar.gz hdf5-aa279ebd1669761f6b37146125dd1fcc0cf99431.tar.bz2 |
More normalization with develop (C library).
-rw-r--r-- | src/H5Fio.c | 6 | ||||
-rw-r--r-- | src/H5Fquery.c | 8 | ||||
-rw-r--r-- | src/H5Fsfile.c | 8 | ||||
-rw-r--r-- | src/H5PB.c | 164 | ||||
-rw-r--r-- | src/H5SL.c | 2 | ||||
-rw-r--r-- | src/H5SM.c | 119 | ||||
-rw-r--r-- | src/H5SMbtree2.c | 1 | ||||
-rw-r--r-- | src/H5SMmessage.c | 1 | ||||
-rw-r--r-- | src/H5Toh.c | 2 |
9 files changed, 154 insertions, 157 deletions
diff --git a/src/H5Fio.c b/src/H5Fio.c index 2fe7b43..11a9e76 100644 --- a/src/H5Fio.c +++ b/src/H5Fio.c @@ -92,8 +92,7 @@ *------------------------------------------------------------------------- */ herr_t -H5F_block_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, - void *buf/*out*/) +H5F_block_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/) { H5FD_mem_t map_type; /* Mapped memory type */ herr_t ret_value = SUCCEED; /* Return value */ @@ -138,8 +137,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5F_block_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, - const void *buf) +H5F_block_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, const void *buf) { H5FD_mem_t map_type; /* Mapped memory type */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Fquery.c b/src/H5Fquery.c index 3f526be..4a1a009 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -277,11 +277,11 @@ H5F_get_nopen_objs(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_file_id + * Function: H5F_get_file_id * - * Purpose: Retrieve the file's 'file_id' value + * Purpose: Retrieve the file's 'file_id' value * - * Return: 'file_id' on success/abort on failure (shouldn't fail) + * Return: 'file_id' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ hid_t @@ -923,7 +923,7 @@ H5F_get_eoa(const H5F_t *f, H5FD_mem_t type) /* Dispatch to driver */ if(HADDR_UNDEF == (ret_value = H5FD_get_eoa(f->shared->lf, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed") done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Fsfile.c b/src/H5Fsfile.c index 6ca338f..1678f49 100644 --- a/src/H5Fsfile.c +++ b/src/H5Fsfile.c @@ -24,7 +24,7 @@ /* Struct for tracking "shared" file structs */ typedef struct H5F_sfile_node_t { - H5F_shared_t *shared; /* Pointer to "shared" file struct */ + H5F_shared_t *shared; /* Pointer to "shared" file struct */ struct H5F_sfile_node_t *next; /* Pointer to next node */ } H5F_sfile_node_t; @@ -84,7 +84,7 @@ H5F_sfile_assert_num(unsigned n) /*------------------------------------------------------------------------- - * Function: H5F_sfile_add + * Function: H5F_sfile_add * * Purpose: Add a "shared" file struct to the list of open files * @@ -123,7 +123,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5F_sfile_search + * Function: H5F_sfile_search * * Purpose: Search for a "shared" file with low-level file info that * matches @@ -163,7 +163,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5F_sfile_remove + * Function: H5F_sfile_remove * * Purpose: Remove a "shared" file struct from the list of open files * @@ -24,20 +24,21 @@ /* Module Setup */ /****************/ -#define H5F_FRIEND /*suppress error about including H5Fpkg */ +#define H5F_FRIEND /* Suppress error about including H5Fpkg */ #include "H5PBmodule.h" /* This source code file is part of the H5PB module */ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fpkg.h" /* Files */ -#include "H5FDprivate.h" /* File drivers */ -#include "H5Iprivate.h" /* IDs */ -#include "H5PBpkg.h" /* File access */ -#include "H5SLprivate.h" /* Skip List */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fpkg.h" /* Files */ +#include "H5FDprivate.h" /* File drivers */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5PBpkg.h" /* File access */ +#include "H5SLprivate.h" /* Skip List */ /****************/ @@ -150,7 +151,7 @@ H5FL_DEFINE_STATIC(H5PB_t); H5FL_DEFINE_STATIC(H5PB_entry_t); - + /*------------------------------------------------------------------------- * Function: H5PB_reset_stats * @@ -161,7 +162,7 @@ H5FL_DEFINE_STATIC(H5PB_entry_t); * * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -187,7 +188,7 @@ H5PB_reset_stats(H5PB_t *page_buf) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5PB_reset_stats() */ - + /*------------------------------------------------------------------------- * Function: H5PB_get_stats * @@ -201,9 +202,9 @@ H5PB_reset_stats(H5PB_t *page_buf) * --evictions: the number of metadata and raw data evictions from the page buffer layer * --bypasses: the number of metadata and raw data accesses that bypass the page buffer layer * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -230,7 +231,7 @@ H5PB_get_stats(const H5PB_t *page_buf, unsigned accesses[2], unsigned hits[2], FUNC_LEAVE_NOAPI(SUCCEED) } /* H5PB_get_stats */ - + /*------------------------------------------------------------------------- * Function: H5PB_print_stats() * @@ -239,9 +240,9 @@ H5PB_get_stats(const H5PB_t *page_buf, unsigned accesses[2], unsigned hits[2], * * Print out statistics collected for the page buffer layer. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -275,15 +276,15 @@ H5PB_print_stats(const H5PB_t *page_buf) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5PB_print_stats */ - + /*------------------------------------------------------------------------- * Function: H5PB_create * - * Purpose: Create and setup the PB on the file. + * Purpose: Create and setup the PB on the file. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -353,15 +354,15 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5PB_create */ - + /*------------------------------------------------------------------------- * Function: H5PB__flush_cb * - * Purpose: Callback to flush PB skiplist entries. + * Purpose: Callback to flush PB skiplist entries. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -387,15 +388,15 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5PB__flush_cb() */ - + /*------------------------------------------------------------------------- * Function: H5PB_flush * - * Purpose: Flush/Free all the PB entries to the file. + * Purpose: Flush/Free all the PB entries to the file. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -422,15 +423,15 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5PB_flush */ - + /*------------------------------------------------------------------------- * Function: H5PB__dest_cb * - * Purpose: Callback to free PB skiplist entries. + * Purpose: Callback to free PB skiplist entries. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -459,15 +460,15 @@ H5PB__dest_cb(void *item, void H5_ATTR_UNUSED *key, void *_op_data) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5PB__dest_cb() */ - + /*------------------------------------------------------------------------- * Function: H5PB_dest * - * Purpose: Flush and destroy the PB on the file if it exists. + * Purpose: Flush and destroy the PB on the file if it exists. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -513,18 +514,18 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5PB_dest */ - + /*------------------------------------------------------------------------- * Function: H5PB_add_new_page * - * Purpose: Add a new page to the new page skip list. This is called + * Purpose: Add a new page to the new page skip list. This is called * from the MF layer when a new page is allocated to * indicate to the page buffer layer that a read of the page * from the file is not necessary since it's an empty page. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -571,18 +572,18 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5PB_add_new_page */ - + /*------------------------------------------------------------------------- * Function: H5PB_update_entry * - * Purpose: In PHDF5, entries that are written by other processes and just + * Purpose: In PHDF5, entries that are written by other processes and just * marked clean by this process have to have their corresponding * pages updated if they exist in the page buffer. * This routine checks and update the pages. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -618,7 +619,7 @@ H5PB_update_entry(H5PB_t *page_buf, haddr_t addr, size_t size, const void *buf) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5PB_update_entry */ - + /*------------------------------------------------------------------------- * Function: H5PB_remove_entry * @@ -669,16 +670,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5PB_remove_entry */ - + /*------------------------------------------------------------------------- * Function: H5PB_read * - * Purpose: Reads in the data from the page containing it if it exists + * Purpose: Reads in the data from the page containing it if it exists * in the PB cache; otherwise reads in the page through the VFD. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -965,17 +966,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5PB_read() */ - + /*------------------------------------------------------------------------- * Function: H5PB_write * - * Purpose: Write data into the Page Buffer. If the page exists in the - * cache, update it; otherwise read it from disk, update it, and - * insert into cache. + * Purpose: Write data into the Page Buffer. If the page exists in the + * cache, update it; otherwise read it from disk, update it, and + * insert into cache. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -1309,24 +1310,22 @@ done: /*------------------------------------------------------------------------- * Function: H5PB__insert_entry() * - * Purpose: ??? - * - * This function was created without documentation. - * What follows is my best understanding of Mohamad's intent. + * Purpose: This function was created without documentation. + * What follows is my best understanding of Mohamad's intent. * - * Insert the supplied page into the page buffer, both the - * skip list and the LRU. + * Insert the supplied page into the page buffer, both the + * skip list and the LRU. * - * As best I can tell, this function imposes no limit on the - * number of entries in the page buffer beyond an assertion - * failure it the page count exceeds the limit. + * As best I can tell, this function imposes no limit on the + * number of entries in the page buffer beyond an assertion + * failure it the page count exceeds the limit. * * JRM -- 12/22/16 * * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -1355,25 +1354,23 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5PB__insert_entry() */ - + /*------------------------------------------------------------------------- * Function: H5PB__make_space() * - * Purpose: ??? - * - * This function was created without documentation. - * What follows is my best understanding of Mohamad's intent. + * Purpose: This function was created without documentation. + * What follows is my best understanding of Mohamad's intent. * - * If necessary and if possible, evict a page from the page - * buffer to make space for the supplied page. Depending on - * the page buffer configuration and contents, and the page - * supplied this may or may not be possible. + * If necessary and if possible, evict a page from the page + * buffer to make space for the supplied page. Depending on + * the page buffer configuration and contents, and the page + * supplied this may or may not be possible. * * JRM -- 12/22/16 * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -1460,19 +1457,18 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5PB__make_space() */ - + /*------------------------------------------------------------------------- * Function: H5PB__write_entry() * - * Purpose: ??? - * - * This function was created without documentation. - * What follows is my best understanding of Mohamad's intent. + * Purpose: ??? * + * This function was created without documentation. + * What follows is my best understanding of Mohamad's intent. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Mohamad Chaarawi + * Programmer: Mohamad Chaarawi * *------------------------------------------------------------------------- */ @@ -652,7 +652,7 @@ int H5SL_term_package(void) /* Terminate all the factories */ if(H5SL_fac_nused_g > 0) { size_t i; - herr_t ret; + herr_t H5_ATTR_NDEBUG_UNUSED ret; for(i = 0; i < H5SL_fac_nused_g; i++) { ret = H5FL_fac_term(H5SL_fac_g[i]); @@ -142,7 +142,7 @@ H5SM_init(H5F_t *f, H5P_genplist_t * fc_plist, const H5O_loc_t *ext_loc) /* Initialize master table */ if(NULL == (table = H5FL_CALLOC(H5SM_master_table_t))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTALLOC, FAIL, "memory allocation failed for SOHM table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTALLOC, FAIL, "memory allocation failed for SOHM table") table->num_indexes = H5F_SOHM_NINDEXES(f); table->table_size = H5SM_TABLE_SIZE(f); @@ -209,11 +209,11 @@ H5SM_init(H5F_t *f, H5P_genplist_t * fc_plist, const H5O_loc_t *ext_loc) /* Allocate space for the table on disk */ if(HADDR_UNDEF == (table_addr = H5MF_alloc(f, H5FD_MEM_SOHM_TABLE, (hsize_t)table->table_size))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "file allocation failed for SOHM table") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "file allocation failed for SOHM table") /* Cache the new table */ if(H5AC_insert_entry(f, H5AC_SOHM_TABLE, table_addr, table, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINS, FAIL, "can't add SOHM table to cache") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINS, FAIL, "can't add SOHM table to cache") /* Record the address of the master table in the file */ H5F_SET_SOHM_ADDR(f, table_addr); @@ -274,6 +274,7 @@ H5SM__type_to_flag(unsigned type_id, unsigned *type_flag) case H5O_FILL_ID: type_id = H5O_FILL_NEW_ID; /* Fall through... */ + H5_ATTR_FALLTHROUGH case H5O_SDSPACE_ID: case H5O_DTYPE_ID: @@ -386,7 +387,7 @@ H5SM_type_shared(H5F_t *f, unsigned type_id) done: /* Release the master SOHM table */ if(table && H5AC_unprotect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, H5AC__NO_FLAGS_SET) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") + HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5SM_type_shared() */ @@ -424,11 +425,11 @@ H5SM_get_fheap_addr(H5F_t *f, unsigned type_id, haddr_t *fheap_addr) /* Look up the master SOHM table */ if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") /* Look up index for message type */ if((index_num = H5SM_get_index(table, type_id)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to find correct SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to find correct SOHM index") /* Retrieve heap address for index */ *fheap_addr = table->indexes[index_num].heap_addr; @@ -436,7 +437,7 @@ H5SM_get_fheap_addr(H5F_t *f, unsigned type_id, haddr_t *fheap_addr) done: /* Release the master SOHM table */ if(table && H5AC_unprotect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, H5AC__NO_FLAGS_SET) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") + HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5SM_get_fheap_addr() */ @@ -648,9 +649,9 @@ H5SM__create_list(H5F_t *f, H5SM_index_header_t *header) /* Allocate list in memory */ if(NULL == (list = H5FL_CALLOC(H5SM_list_t))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for SOHM list") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for SOHM list") if(NULL == (list->messages = (H5SM_sohm_t *)H5FL_ARR_CALLOC(H5SM_sohm_t, num_entries))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for SOHM list") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for SOHM list") /* Initialize messages in list */ for(x = 0; x < num_entries; x++) @@ -661,11 +662,11 @@ H5SM__create_list(H5F_t *f, H5SM_index_header_t *header) /* Allocate space for the list on disk */ if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_SOHM_INDEX, (hsize_t)header->list_size))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for SOHM list") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for SOHM list") /* Put the list into the cache */ if(H5AC_insert_entry(f, H5AC_SOHM_LIST, addr, list, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINS, HADDR_UNDEF, "can't add SOHM list to cache") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINS, HADDR_UNDEF, "can't add SOHM list to cache") /* Set return value */ ret_value = addr; @@ -773,7 +774,7 @@ H5SM__convert_list_to_btree(H5F_t *f, H5SM_index_header_t *header, /* Unprotect list in cache and release heap */ if(H5AC_unprotect(f, H5AC_SOHM_LIST, header->index_addr, list, H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to release SOHM list") + HGOTO_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to release SOHM list") *_list = list = NULL; /* Delete the old list index (but not its heap, which the new index is @@ -973,7 +974,7 @@ H5SM_can_share(H5F_t *f, H5SM_master_table_t *table, done: /* Release the master SOHM table, if we protected it */ if(my_table && my_table != table && H5AC_unprotect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), my_table, H5AC__NO_FLAGS_SET) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") + HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5SM_can_share() */ @@ -1081,7 +1082,7 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, /* Look up the master SOHM table */ if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") /* "complex" sharing checks */ if((tri_ret = H5SM_can_share(f, table, &index_num, type_id, mesg)) < 0) @@ -1103,7 +1104,7 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, */ if(H5SM__write_mesg(f, open_oh, &(table->indexes[index_num]), (defer_flags & H5SM_DEFER) != 0, type_id, mesg, &cache_flags) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "can't write shared message") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "can't write shared message") /* Set flags if this message was "written" without error and wasn't a * 'defer' attempt; it is now either fully shared or "shareable". @@ -1130,7 +1131,7 @@ done: /* Release the master SOHM table */ if(table && H5AC_unprotect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, cache_flags) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") + HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5SM_try_share() */ @@ -1254,15 +1255,15 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, /* Encode the message to be written */ if((buf_size = H5O_msg_raw_size(f, type_id, TRUE, mesg)) == 0) - HGOTO_ERROR(H5E_SOHM, H5E_BADSIZE, FAIL, "can't find message size") + HGOTO_ERROR(H5E_SOHM, H5E_BADSIZE, FAIL, "can't find message size") if(NULL == (encoding_buf = H5MM_malloc(buf_size))) - HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "can't allocate buffer for encoding") + HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "can't allocate buffer for encoding") if(H5O_msg_encode(f, type_id, TRUE, (unsigned char *)encoding_buf, mesg) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTENCODE, FAIL, "can't encode message to be shared") + HGOTO_ERROR(H5E_SOHM, H5E_CANTENCODE, FAIL, "can't encode message to be shared") /* Open the fractal heap for this index */ if(NULL == (fheap = H5HF_open(f, header->heap_addr))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") /* Set up a key for the message to be written */ key.file = f; @@ -1285,14 +1286,14 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, /* The index is a list; get it from the cache */ if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, H5AC_SOHM_LIST, header->index_addr, &cache_udata, defer ? H5AC__READ_ONLY_FLAG : H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index") /* See if the message is already in the index and get its location. * Also record the first empty list position we find in case we need it * later. */ if(H5SM__find_in_list(list, &key, &empty_pos, &list_pos) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to search for message in list") + HGOTO_ERROR(H5E_SOHM, H5E_CANTINSERT, FAIL, "unable to search for message in list") if(defer) { if(list_pos != UFAIL) @@ -1503,7 +1504,7 @@ done: /* If we got a list out of the cache, release it (it is always dirty after writing a message) */ if(list && H5AC_unprotect(f, H5AC_SOHM_LIST, header->index_addr, list, defer ? H5AC__NO_FLAGS_SET : H5AC__DIRTIED_FLAG) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM index") + HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM index") if(encoding_buf) encoding_buf = H5MM_xfree(encoding_buf); @@ -1557,11 +1558,11 @@ H5SM_delete(H5F_t *f, H5O_t *open_oh, H5O_shared_t *sh_mesg) /* Look up the master SOHM table */ if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") /* Find the correct index and try to delete from it */ if((index_num = H5SM_get_index(table, type_id)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index") /* If mesg_buf is not NULL, the message's reference count has reached * zero and any file space it uses needs to be freed. mesg_buf holds the @@ -1572,7 +1573,7 @@ H5SM_delete(H5F_t *f, H5O_t *open_oh, H5O_shared_t *sh_mesg) /* Release the master SOHM table */ if(H5AC_unprotect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, cache_flags) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") table = NULL; /* If buf was allocated, delete the message it holds. This message may @@ -1590,7 +1591,7 @@ H5SM_delete(H5F_t *f, H5O_t *open_oh, H5O_shared_t *sh_mesg) done: /* Release the master SOHM table (should only happen on error) */ if(table && H5AC_unprotect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, cache_flags) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") + HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") /* Release any native message we decoded */ if(native_mesg) @@ -1794,7 +1795,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, /* Open the heap for this type of message. */ if(NULL == (fheap = H5HF_open(f, header->heap_addr))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") /* Get the message size and encoded message for the message to be deleted, * either from its OH or from the heap. @@ -1813,7 +1814,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, /* Get the encoded message */ if(H5SM__read_mesg(f, &key.message, fheap, open_oh, &buf_size, &encoding_buf) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") /* Set up key for message to be deleted. */ key.file = f; @@ -1833,13 +1834,13 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, /* If the index is stored as a list, get it from the cache */ if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, H5AC_SOHM_LIST, header->index_addr, &cache_udata, H5AC__NO_FLAGS_SET))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index") /* Find the message in the list */ if(H5SM__find_in_list(list, &key, NULL, &list_pos) < 0) HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to search for message in list") if(list_pos == UFAIL) - HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index") + HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index") if(list->messages[list_pos].location == H5SM_IN_HEAP) --(list->messages[list_pos].u.heap_loc.ref_count); @@ -1859,7 +1860,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, * If it succeeds, a copy of the modified message will be returned. */ if(H5B2_modify(bt2, &key, H5SM__decr_ref, &message) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index") + HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index") /* Point to the message */ message_ptr = &message; @@ -1893,7 +1894,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, /* Remove the message from the heap if it was stored in the heap*/ if(old_loc == H5SM_IN_HEAP) if(H5HF_remove(fheap, &(message_ptr->u.heap_loc.fheap_id)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTREMOVE, FAIL, "unable to remove message from heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTREMOVE, FAIL, "unable to remove message from heap") /* Return the message's encoding so anything it references can be freed */ @@ -1905,7 +1906,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, /* Unprotect cache and release heap */ if(list && H5AC_unprotect(f, H5AC_SOHM_LIST, header->index_addr, list, H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to release SOHM list") + HGOTO_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to release SOHM list") list = NULL; HDassert(fheap); @@ -1929,7 +1930,7 @@ H5SM__delete_from_index(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, done: /* Release the SOHM list */ if(list && H5AC_unprotect(f, H5AC_SOHM_LIST, header->index_addr, list, H5AC__DIRTIED_FLAG) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM index") + HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM index") /* Release the fractal heap & v2 B-tree if we opened them */ if(fheap && H5HF_close(fheap) < 0) @@ -2068,7 +2069,7 @@ done: /* Release the master SOHM table if we took it out of the cache */ if(table && H5AC_unprotect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, H5AC__NO_FLAGS_SET) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") + HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5SM_get_info() */ @@ -2180,16 +2181,16 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, /* Look up the master SOHM table */ if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &tbl_cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") /* Find the correct index and find the message in it */ if((index_num = H5SM_get_index(table, type_id)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to find correct SOHM index") header = &(table->indexes[index_num]); /* Open the heap for this message type */ if(NULL == (fheap = H5HF_open(f, header->heap_addr))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") /* Set up a SOHM message to correspond to the shared message passed in */ key.message.location = H5SM_IN_HEAP; @@ -2198,7 +2199,7 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, /* Get the encoded message */ if(H5SM__read_mesg(f, &key.message, fheap, NULL, &buf_size, &encoding_buf) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") + HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") /* Set up key for message to locate */ key.file = f; @@ -2218,13 +2219,13 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, /* If the index is stored as a list, get it from the cache */ if(NULL == (list = (H5SM_list_t *)H5AC_protect(f, H5AC_SOHM_LIST, header->index_addr, &lst_cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM index") /* Find the message in the list */ if(H5SM__find_in_list(list, &key, NULL, &list_pos) < 0) HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "unable to search for message in list") if(list_pos == UFAIL) - HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index") + HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index") /* Copy the message */ message = list->messages[list_pos]; @@ -2243,7 +2244,7 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, if((msg_exists = H5B2_find(bt2, &key, H5SM_get_refcount_bt2_cb, &message)) < 0) HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "error finding message in index") if(!msg_exists) - HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index") + HGOTO_ERROR(H5E_SOHM, H5E_NOTFOUND, FAIL, "message not in index") } /* end else */ /* Set the refcount for the message */ @@ -2253,9 +2254,9 @@ H5SM_get_refcount(H5F_t *f, unsigned type_id, const H5O_shared_t *sh_mesg, done: /* Release resources */ if(list && H5AC_unprotect(f, H5AC_SOHM_LIST, header->index_addr, list, H5AC__NO_FLAGS_SET) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM index") + HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM index") if(table && H5AC_unprotect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), table, H5AC__NO_FLAGS_SET) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") + HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") if(fheap && H5HF_close(fheap) < 0) HDONE_ERROR(H5E_SOHM, H5E_CANTCLOSEOBJ, FAIL, "can't close fractal heap") if(bt2 && H5B2_close(bt2) < 0) @@ -2418,11 +2419,11 @@ H5SM__read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap, oloc.file = f; oloc.addr = mesg->u.mesg_loc.oh_addr; if(H5O_open(&oloc) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, FAIL, "unable to open object header") + HGOTO_ERROR(H5E_SOHM, H5E_CANTLOAD, FAIL, "unable to open object header") /* Load the object header from the cache */ if(NULL == (oh = H5O_protect(&oloc, H5AC__READ_ONLY_FLAG, FALSE))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load object header") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load object header") } /* end if */ else oh = open_oh; @@ -2559,11 +2560,11 @@ H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int indent, if(table_vers == UFAIL) table_vers = H5F_SOHM_VERS(f); else if(table_vers != H5F_SOHM_VERS(f)) - HDfprintf(stream, "*** SOHM TABLE VERSION DOESN'T MATCH VERSION IN SUPERBLOCK!\n"); + HDfprintf(stream, "*** SOHM TABLE VERSION DOESN'T MATCH VERSION IN SUPERBLOCK!\n"); if(num_indexes == UFAIL) num_indexes = H5F_SOHM_NINDEXES(f); else if(num_indexes != H5F_SOHM_NINDEXES(f)) - HDfprintf(stream, "*** NUMBER OF SOHM INDEXES DOESN'T MATCH VALUE IN SUPERBLOCK!\n"); + HDfprintf(stream, "*** NUMBER OF SOHM INDEXES DOESN'T MATCH VALUE IN SUPERBLOCK!\n"); /* Check arguments. Version must be 0, the only version implemented so far */ if(table_vers > HDF5_SHAREDHEADER_VERSION) @@ -2576,7 +2577,7 @@ H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int indent, /* Look up the master SOHM table */ if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, table_addr, &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") HDfprintf(stream, "%*sShared Message Master Table...\n", indent, ""); for(x = 0; x < num_indexes; ++x) { @@ -2604,7 +2605,7 @@ H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int indent, done: if(table && H5AC_unprotect(f, H5AC_SOHM_TABLE, table_addr, table, H5AC__NO_FLAGS_SET) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") + HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5SM_table_debug() */ @@ -2650,7 +2651,7 @@ H5SM_list_debug(H5F_t *f, haddr_t list_addr, FILE *stream, int indent, /* Look up the master SOHM table */ if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, table_addr, &tbl_cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") /* Determine which index the list is part of */ index_num = table->num_indexes; @@ -2708,11 +2709,11 @@ H5SM_list_debug(H5F_t *f, haddr_t list_addr, FILE *stream, int indent, done: if(fh && H5HF_close(fh) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CANTCLOSEOBJ, FAIL, "unable to close SOHM heap") + HDONE_ERROR(H5E_SOHM, H5E_CANTCLOSEOBJ, FAIL, "unable to close SOHM heap") if(list && H5AC_unprotect(f, H5AC_SOHM_LIST, list_addr, list, H5AC__NO_FLAGS_SET) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM index") + HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM index") if(table && H5AC_unprotect(f, H5AC_SOHM_TABLE, table_addr, table, H5AC__NO_FLAGS_SET) < 0) - HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") + HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table") FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5SM_list_debug() */ @@ -2757,7 +2758,7 @@ H5SM_ih_size(H5F_t *f, hsize_t *hdr_size, H5_ih_info_t *ih_info) /* Look up the master SOHM table */ if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, H5AC_SOHM_TABLE, H5F_SOHM_ADDR(f), &cache_udata, H5AC__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") + HGOTO_ERROR(H5E_SOHM, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table") /* Get SOHM header size */ *hdr_size = table->table_size; @@ -2771,7 +2772,7 @@ H5SM_ih_size(H5F_t *f, hsize_t *hdr_size, H5_ih_info_t *ih_info) if(NULL == (bt2 = H5B2_open(f, table->indexes[u].index_addr, f))) HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index") - if(H5B2_size(bt2, &(ih_info->index_size)) < 0) + if(H5B2_size(bt2, &(ih_info->index_size)) < 0) HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info") /* Close the v2 B-tree */ @@ -2792,8 +2793,8 @@ H5SM_ih_size(H5F_t *f, hsize_t *hdr_size, H5_ih_info_t *ih_info) HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap") /* Get heap storage size */ - if(H5HF_size(fheap, &(ih_info->heap_size)) < 0) - HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't retrieve fractal heap storage info") + if(H5HF_size(fheap, &(ih_info->heap_size)) < 0) + HGOTO_ERROR(H5E_SOHM, H5E_CANTGET, FAIL, "can't retrieve fractal heap storage info") /* Close the fractal heap */ if(H5HF_close(fheap) < 0) diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c index 0c4224b..7f6c804 100644 --- a/src/H5SMbtree2.c +++ b/src/H5SMbtree2.c @@ -24,6 +24,7 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ +#include "H5MMprivate.h" /* Memory management */ #include "H5Opkg.h" /* Object Headers */ #include "H5SMpkg.h" /* Shared object header messages */ diff --git a/src/H5SMmessage.c b/src/H5SMmessage.c index cc843bc..e085204 100644 --- a/src/H5SMmessage.c +++ b/src/H5SMmessage.c @@ -24,6 +24,7 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ +#include "H5MMprivate.h" /* Memory management */ #include "H5Opkg.h" /* Object Headers */ #include "H5SMpkg.h" /* Shared object header messages */ diff --git a/src/H5Toh.c b/src/H5Toh.c index c0139fe..c5ee994 100644 --- a/src/H5Toh.c +++ b/src/H5Toh.c @@ -180,7 +180,7 @@ H5O__dtype_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc) /* Commit the type to the file */ if(H5T__commit(f, crt_info->dt, crt_info->tcpl_id) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to commit datatype") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to commit datatype") /* Set up the new named datatype's location */ if(NULL == (obj_loc->oloc = H5T_oloc(crt_info->dt))) |