From 016a42fd6e446af25d43c53d413356026ebc5db2 Mon Sep 17 00:00:00 2001 From: Muqun Yang Date: Mon, 25 Oct 2021 16:37:35 -0500 Subject: Remove the compiler warnings. --- src/H5FDvfd_swmr_private.h | 2 ++ src/H5Fpkg.h | 15 +++++++++++++++ src/H5Fvfd_swmr.c | 12 +++++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/H5FDvfd_swmr_private.h b/src/H5FDvfd_swmr_private.h index 2dd9513..9e56d00 100644 --- a/src/H5FDvfd_swmr_private.h +++ b/src/H5FDvfd_swmr_private.h @@ -106,6 +106,7 @@ H5_DLL herr_t H5F_dump_eot_queue(void); * H5F_POST_VFD_SWMR_LOG_ENTRY(f, 3, log_msg) will put the log_msg attached to * the entry tag "EOT_PROCESSING_TIME". */ +#if 0 /* clang-format off */ /* The entry code number is listed in the comment for convenience. */ static const char *H5Fvfd_swmr_log_tags[] = { @@ -116,5 +117,6 @@ static const char *H5Fvfd_swmr_log_tags[] = { "EOT_META_FILE_INDEX" /* 4 */ }; /* clang-format on */ +#endif #endif /* H5FDvfd_swmr_private_H */ diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index 5eaee3c..3240d84 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -623,4 +623,19 @@ H5_DLL herr_t H5F__reparse_file_lock_variable_test(void); H5F_post_vfd_swmr_log_entry(fp, entry_type_code, body); H5_DLL herr_t H5F_post_vfd_swmr_log_entry(H5F_t *f, int entry_type_code, char *body); +/* clang-format off */ +/* The entry code number is listed in the comment for convenience. */ + +#if 0 +static const char *H5Fvfd_swmr_log_tags[] = { + "FILE_OPEN", /* 0 */ + "FILE_CLOSE", /* 1 */ + "EOT_TRIGGER_TIME", /* 2 */ + "EOT_PROCESSING_TIME", /* 3 */ + "EOT_META_FILE_INDEX" /* 4 */ + }; +#endif +/* clang-format on */ + + #endif /* H5Fpkg_H */ diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c index 918ef97..5119b38 100644 --- a/src/H5Fvfd_swmr.c +++ b/src/H5Fvfd_swmr.c @@ -54,6 +54,17 @@ #define nanosecs_per_second 1000000000 /* nanoseconds per second */ #define nanosecs_per_tenth_sec 100000000 /* nanoseconds per 0.1 second */ +/* clang-format off */ +/* The entry code number is listed in the comment for convenience. */ +static const char *H5Fvfd_swmr_log_tags[] = { + "FILE_OPEN", /* 0 */ + "FILE_CLOSE", /* 1 */ + "EOT_TRIGGER_TIME", /* 2 */ + "EOT_PROCESSING_TIME", /* 3 */ + "EOT_META_FILE_INDEX" /* 4 */ + }; +/* clang-format on */ + /********************/ /* Local Prototypes */ /********************/ @@ -1917,7 +1928,6 @@ H5F_post_vfd_swmr_log_entry(H5F_t *f, int entry_type_code, char *body) herr_t ret_value = SUCCEED; double temp_time; struct timespec current_time; - FUNC_ENTER_NOAPI(FAIL) if (HDclock_gettime(CLOCK_MONOTONIC, ¤t_time) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get time via clock_gettime"); -- cgit v0.12