Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds const to a few global variables #623

Merged
merged 28 commits into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ba9deae
Committing clang-format changes
github-actions[bot] Mar 19, 2021
00f9750
Merge remote-tracking branch 'canonical/develop' into develop
derobins Mar 21, 2021
e997283
Merge remote-tracking branch 'canonical/develop' into develop
derobins Mar 22, 2021
3eac585
Merge remote-tracking branch 'canonical/develop' into develop
derobins Mar 23, 2021
71643b7
Merge remote-tracking branch 'canonical/develop' into develop
derobins Mar 24, 2021
d242911
Merge remote-tracking branch 'canonical/develop' into develop
derobins Mar 24, 2021
bc70f95
Merge remote-tracking branch 'canonical/develop' into develop
derobins Mar 26, 2021
3d7ad8e
Merge remote-tracking branch 'canonical/develop' into develop
derobins Mar 26, 2021
aeb16b7
Merge branch 'develop' of https://github.com/derobins/hdf5 into develop
derobins Mar 26, 2021
765cb5b
Merge remote-tracking branch 'canonical/develop' into develop
derobins Mar 27, 2021
18401fc
Merge remote-tracking branch 'canonical/develop' into develop
derobins Mar 29, 2021
222242c
Merge branch 'develop' of https://github.com/derobins/hdf5 into develop
derobins Mar 29, 2021
8d0cafa
Merge remote-tracking branch 'canonical/develop' into develop
derobins Mar 30, 2021
d3694d1
Merge remote-tracking branch 'canonical/develop' into develop
derobins Apr 2, 2021
1c7bcc2
Merge remote-tracking branch 'canonical/develop' into develop
derobins Apr 15, 2021
70551e3
Merge remote-tracking branch 'canonical/develop' into develop
derobins Apr 16, 2021
2dfc7db
Merge remote-tracking branch 'canonical/develop' into develop
derobins Apr 20, 2021
71d2fbf
Merge remote-tracking branch 'canonical/develop' into develop
derobins Apr 21, 2021
c8925f8
Merge remote-tracking branch 'canonical/develop' into develop
derobins Apr 22, 2021
dd3e970
Merge branch 'develop' of https://github.com/derobins/hdf5 into develop
derobins Apr 22, 2021
bb61990
Merge remote-tracking branch 'canonical/develop' into develop
derobins Apr 23, 2021
2c2b368
Merge remote-tracking branch 'canonical/develop' into develop
derobins Apr 25, 2021
be2ada6
Merge remote-tracking branch 'canonical/develop' into develop
derobins Apr 27, 2021
439f3a8
Merge remote-tracking branch 'canonical/develop' into develop
derobins Apr 28, 2021
649aa9b
Merge remote-tracking branch 'canonical/develop' into develop
derobins Apr 29, 2021
3fa627f
Merge remote-tracking branch 'canonical/develop' into develop
derobins Apr 29, 2021
0df36ec
Merge remote-tracking branch 'canonical/develop' into develop
derobins May 3, 2021
35e2ef8
Adds consts to a few global variables
derobins May 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions src/H5Clog_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
52 changes: 26 additions & 26 deletions src/H5Clog_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions src/H5MF.c
Original file line number Diff line number Diff line change
Expand Up @@ -1442,13 +1442,13 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi
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
Expand Down
6 changes: 3 additions & 3 deletions src/H5MFpkg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
6 changes: 3 additions & 3 deletions src/H5MFsection.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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 */
Expand All @@ -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 */
Expand Down