mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-13 16:47:58 +08:00
Adds const to a few global variables (#623)
* Committing clang-format changes * Adds consts to a few global variables Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
3899e090df
commit
c7d45c205e
@ -118,32 +118,32 @@ static herr_t H5C__json_write_remove_entry_log_msg(void *udata, const H5C_cache_
|
||||
/* Note that there's no cache set up call since that's the
|
||||
* place where this struct is wired into the cache.
|
||||
*/
|
||||
static H5C_log_class_t H5C_json_log_class_g = {"json",
|
||||
H5C__json_tear_down_logging,
|
||||
NULL, /* start logging */
|
||||
NULL, /* stop logging */
|
||||
H5C__json_write_start_log_msg,
|
||||
H5C__json_write_stop_log_msg,
|
||||
H5C__json_write_create_cache_log_msg,
|
||||
H5C__json_write_destroy_cache_log_msg,
|
||||
H5C__json_write_evict_cache_log_msg,
|
||||
H5C__json_write_expunge_entry_log_msg,
|
||||
H5C__json_write_flush_cache_log_msg,
|
||||
H5C__json_write_insert_entry_log_msg,
|
||||
H5C__json_write_mark_entry_dirty_log_msg,
|
||||
H5C__json_write_mark_entry_clean_log_msg,
|
||||
H5C__json_write_mark_unserialized_entry_log_msg,
|
||||
H5C__json_write_mark_serialized_entry_log_msg,
|
||||
H5C__json_write_move_entry_log_msg,
|
||||
H5C__json_write_pin_entry_log_msg,
|
||||
H5C__json_write_create_fd_log_msg,
|
||||
H5C__json_write_protect_entry_log_msg,
|
||||
H5C__json_write_resize_entry_log_msg,
|
||||
H5C__json_write_unpin_entry_log_msg,
|
||||
H5C__json_write_destroy_fd_log_msg,
|
||||
H5C__json_write_unprotect_entry_log_msg,
|
||||
H5C__json_write_set_cache_config_log_msg,
|
||||
H5C__json_write_remove_entry_log_msg};
|
||||
static const H5C_log_class_t H5C_json_log_class_g = {"json",
|
||||
H5C__json_tear_down_logging,
|
||||
NULL, /* start logging */
|
||||
NULL, /* stop logging */
|
||||
H5C__json_write_start_log_msg,
|
||||
H5C__json_write_stop_log_msg,
|
||||
H5C__json_write_create_cache_log_msg,
|
||||
H5C__json_write_destroy_cache_log_msg,
|
||||
H5C__json_write_evict_cache_log_msg,
|
||||
H5C__json_write_expunge_entry_log_msg,
|
||||
H5C__json_write_flush_cache_log_msg,
|
||||
H5C__json_write_insert_entry_log_msg,
|
||||
H5C__json_write_mark_entry_dirty_log_msg,
|
||||
H5C__json_write_mark_entry_clean_log_msg,
|
||||
H5C__json_write_mark_unserialized_entry_log_msg,
|
||||
H5C__json_write_mark_serialized_entry_log_msg,
|
||||
H5C__json_write_move_entry_log_msg,
|
||||
H5C__json_write_pin_entry_log_msg,
|
||||
H5C__json_write_create_fd_log_msg,
|
||||
H5C__json_write_protect_entry_log_msg,
|
||||
H5C__json_write_resize_entry_log_msg,
|
||||
H5C__json_write_unpin_entry_log_msg,
|
||||
H5C__json_write_destroy_fd_log_msg,
|
||||
H5C__json_write_unprotect_entry_log_msg,
|
||||
H5C__json_write_set_cache_config_log_msg,
|
||||
H5C__json_write_remove_entry_log_msg};
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5C__json_write_log_message
|
||||
|
@ -113,32 +113,32 @@ static herr_t H5C__trace_write_remove_entry_log_msg(void *udata, const H5C_cache
|
||||
/* Note that there's no cache set up call since that's the
|
||||
* place where this struct is wired into the cache.
|
||||
*/
|
||||
static H5C_log_class_t H5C_trace_log_class_g = {"trace",
|
||||
H5C__trace_tear_down_logging,
|
||||
NULL, /* start logging */
|
||||
NULL, /* stop logging */
|
||||
NULL, /* write start message */
|
||||
NULL, /* write stop message */
|
||||
NULL, /* write create cache message */
|
||||
NULL, /* write destroy cache message */
|
||||
NULL, /* write evict cache message */
|
||||
H5C__trace_write_expunge_entry_log_msg,
|
||||
H5C__trace_write_flush_cache_log_msg,
|
||||
H5C__trace_write_insert_entry_log_msg,
|
||||
H5C__trace_write_mark_entry_dirty_log_msg,
|
||||
H5C__trace_write_mark_entry_clean_log_msg,
|
||||
H5C__trace_write_mark_unserialized_entry_log_msg,
|
||||
H5C__trace_write_mark_serialized_entry_log_msg,
|
||||
H5C__trace_write_move_entry_log_msg,
|
||||
H5C__trace_write_pin_entry_log_msg,
|
||||
H5C__trace_write_create_fd_log_msg,
|
||||
H5C__trace_write_protect_entry_log_msg,
|
||||
H5C__trace_write_resize_entry_log_msg,
|
||||
H5C__trace_write_unpin_entry_log_msg,
|
||||
H5C__trace_write_destroy_fd_log_msg,
|
||||
H5C__trace_write_unprotect_entry_log_msg,
|
||||
H5C__trace_write_set_cache_config_log_msg,
|
||||
H5C__trace_write_remove_entry_log_msg};
|
||||
static const H5C_log_class_t H5C_trace_log_class_g = {"trace",
|
||||
H5C__trace_tear_down_logging,
|
||||
NULL, /* start logging */
|
||||
NULL, /* stop logging */
|
||||
NULL, /* write start message */
|
||||
NULL, /* write stop message */
|
||||
NULL, /* write create cache message */
|
||||
NULL, /* write destroy cache message */
|
||||
NULL, /* write evict cache message */
|
||||
H5C__trace_write_expunge_entry_log_msg,
|
||||
H5C__trace_write_flush_cache_log_msg,
|
||||
H5C__trace_write_insert_entry_log_msg,
|
||||
H5C__trace_write_mark_entry_dirty_log_msg,
|
||||
H5C__trace_write_mark_entry_clean_log_msg,
|
||||
H5C__trace_write_mark_unserialized_entry_log_msg,
|
||||
H5C__trace_write_mark_serialized_entry_log_msg,
|
||||
H5C__trace_write_move_entry_log_msg,
|
||||
H5C__trace_write_pin_entry_log_msg,
|
||||
H5C__trace_write_create_fd_log_msg,
|
||||
H5C__trace_write_protect_entry_log_msg,
|
||||
H5C__trace_write_resize_entry_log_msg,
|
||||
H5C__trace_write_unpin_entry_log_msg,
|
||||
H5C__trace_write_destroy_fd_log_msg,
|
||||
H5C__trace_write_unprotect_entry_log_msg,
|
||||
H5C__trace_write_set_cache_config_log_msg,
|
||||
H5C__trace_write_remove_entry_log_msg};
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5C__trace_write_log_message
|
||||
|
14
src/H5MF.c
14
src/H5MF.c
@ -1442,13 +1442,13 @@ done:
|
||||
htri_t
|
||||
H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size)
|
||||
{
|
||||
H5MF_free_section_t * node = NULL; /* Free space section pointer */
|
||||
H5MF_sect_ud_t udata; /* User data for callback */
|
||||
H5FS_section_class_t *sect_cls; /* Section class */
|
||||
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
|
||||
H5AC_ring_t fsm_ring = H5AC_RING_INV; /* Ring of FSM */
|
||||
H5F_mem_page_t fs_type; /* Free space type */
|
||||
htri_t ret_value = FALSE; /* Return value */
|
||||
H5MF_free_section_t * node = NULL; /* Free space section pointer */
|
||||
H5MF_sect_ud_t udata; /* User data for callback */
|
||||
const H5FS_section_class_t *sect_cls; /* Section class */
|
||||
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
|
||||
H5AC_ring_t fsm_ring = H5AC_RING_INV; /* Ring of FSM */
|
||||
H5F_mem_page_t fs_type; /* Free space type */
|
||||
htri_t ret_value = FALSE; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
|
||||
#ifdef H5MF_ALLOC_DEBUG
|
||||
|
@ -168,9 +168,9 @@ typedef struct H5MF_fs_t {
|
||||
/*****************************/
|
||||
|
||||
/* H5MF single section inherits serializable properties from H5FS_section_class_t */
|
||||
H5_DLLVAR H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SIMPLE[1];
|
||||
H5_DLLVAR H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SMALL[1];
|
||||
H5_DLLVAR H5FS_section_class_t H5MF_FSPACE_SECT_CLS_LARGE[1];
|
||||
H5_DLLVAR const H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SIMPLE[1];
|
||||
H5_DLLVAR const H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SMALL[1];
|
||||
H5_DLLVAR const H5FS_section_class_t H5MF_FSPACE_SECT_CLS_LARGE[1];
|
||||
|
||||
/******************************/
|
||||
/* Package Private Prototypes */
|
||||
|
@ -81,7 +81,7 @@ static herr_t H5MF__sect_large_shrink(H5FS_section_info_t **_sect, void *udata);
|
||||
/*********************/
|
||||
|
||||
/* Class info for "simple" free space sections */
|
||||
H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SIMPLE[1] = {{
|
||||
const H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SIMPLE[1] = {{
|
||||
/* Class variables */
|
||||
H5MF_FSPACE_SECT_SIMPLE, /* Section type */
|
||||
0, /* Extra serialized size */
|
||||
@ -107,7 +107,7 @@ H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SIMPLE[1] = {{
|
||||
}};
|
||||
|
||||
/* Class info for "small" free space sections */
|
||||
H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SMALL[1] = {{
|
||||
const H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SMALL[1] = {{
|
||||
/* Class variables */
|
||||
H5MF_FSPACE_SECT_SMALL, /* Section type */
|
||||
0, /* Extra serialized size */
|
||||
@ -133,7 +133,7 @@ H5FS_section_class_t H5MF_FSPACE_SECT_CLS_SMALL[1] = {{
|
||||
}};
|
||||
|
||||
/* Class info for "large" free space sections */
|
||||
H5FS_section_class_t H5MF_FSPACE_SECT_CLS_LARGE[1] = {{
|
||||
const H5FS_section_class_t H5MF_FSPACE_SECT_CLS_LARGE[1] = {{
|
||||
/* Class variables */
|
||||
H5MF_FSPACE_SECT_LARGE, /* Section type */
|
||||
0, /* Extra serialized size */
|
||||
|
Loading…
x
Reference in New Issue
Block a user