summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/accum.c2
-rw-r--r--test/accum_swmr_reader.c2
-rw-r--r--test/app_ref.c10
-rw-r--r--test/btree2.c2
-rw-r--r--test/cache.c58
-rw-r--r--test/cache_api.c2
-rw-r--r--test/cache_common.c16
-rw-r--r--test/cache_image.c2
-rw-r--r--test/cache_logging.c2
-rw-r--r--test/cache_tagging.c10
-rw-r--r--test/chunk_info.c14
-rw-r--r--test/cmpd_dset.c2
-rw-r--r--test/cross_read.c2
-rw-r--r--test/dangle.c2
-rw-r--r--test/del_many_dense_attrs.c2
-rw-r--r--test/direct_chunk.c4
-rw-r--r--test/dsets.c60
-rw-r--r--test/dt_arith.c2
-rw-r--r--test/dtypes.c37
-rw-r--r--test/earray.c2
-rw-r--r--test/efc.c2
-rw-r--r--test/enum.c2
-rw-r--r--test/err_compat.c10
-rw-r--r--test/error_test.c32
-rw-r--r--test/event_set.c4
-rw-r--r--test/extend.c2
-rw-r--r--test/farray.c2
-rw-r--r--test/fheap.c2
-rw-r--r--test/file_image.c18
-rw-r--r--test/fillval.c8
-rw-r--r--test/filter_fail.c2
-rw-r--r--test/filter_plugin.c18
-rw-r--r--test/flush1.c6
-rw-r--r--test/flush2.c6
-rw-r--r--test/flushrefresh.c2
-rw-r--r--test/freespace.c2
-rw-r--r--test/gen_bad_compound.c2
-rw-r--r--test/gen_mergemsg.c2
-rw-r--r--test/genall5.c4
-rw-r--r--test/getname.c2
-rw-r--r--test/gheap.c2
-rw-r--r--test/istore.c2
-rw-r--r--test/lheap.c2
-rw-r--r--test/links.c110
-rw-r--r--test/links_env.c8
-rw-r--r--test/mdset.c2
-rw-r--r--test/mf.c6
-rw-r--r--test/mount.c5
-rw-r--r--test/mtime.c2
-rw-r--r--test/ntypes.c2
-rw-r--r--test/objcopy.c4
-rw-r--r--test/objcopy_ref.c14
-rw-r--r--test/ohdr.c2
-rw-r--r--test/onion.c13
-rw-r--r--test/page_buffer.c2
-rw-r--r--test/reserved.c2
-rw-r--r--test/set_extent.c4
-rw-r--r--test/stab.c2
-rw-r--r--test/swmr.c8
-rw-r--r--test/tattr.c405
-rw-r--r--test/tcheck_version.c6
-rw-r--r--test/tcoords.c2
-rw-r--r--test/testframe.c2
-rw-r--r--test/tfile.c8
-rw-r--r--test/tgenprop.c14
-rw-r--r--test/th5s.c12
-rw-r--r--test/tid.c2
-rw-r--r--test/tmeta.c4
-rw-r--r--test/tsohm.c57
-rw-r--r--test/unlink.c6
-rw-r--r--test/unregister.c4
-rw-r--r--test/use_disable_mdc_flushes.c18
-rw-r--r--test/vds.c6
-rw-r--r--test/vds_env.c2
-rw-r--r--test/vfd.c34
-rw-r--r--test/vol.c2
76 files changed, 576 insertions, 561 deletions
diff --git a/test/accum.c b/test/accum.c
index 816d9c0..e85586a 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -27,7 +27,7 @@
/* Filename */
/* (The file names are the same as the define in accum_swmr_reader.c) */
-const char *FILENAME[] = {"accum", "accum_swmr_big", NULL};
+static const char *FILENAME[] = {"accum", "accum_swmr_big", NULL};
/* The reader forked by test_swmr_write_big() */
#define SWMR_READER "accum_swmr_reader"
diff --git a/test/accum_swmr_reader.c b/test/accum_swmr_reader.c
index 10698c1..7ab9ab9 100644
--- a/test/accum_swmr_reader.c
+++ b/test/accum_swmr_reader.c
@@ -23,7 +23,7 @@
#include "H5VLprivate.h" /* Virtual Object Layer */
/* Filename: this is the same as the define in accum.c used by test_swmr_write_big() */
-const char *FILENAME[] = {"accum", "accum_swmr_big", NULL};
+static const char *FILENAME[] = {"accum", "accum_swmr_big", NULL};
/*-------------------------------------------------------------------------
* Function: main
diff --git a/test/app_ref.c b/test/app_ref.c
index 9b08650..68b4e5b 100644
--- a/test/app_ref.c
+++ b/test/app_ref.c
@@ -54,13 +54,13 @@ typedef enum {
T_NUMCLASSES
} id_class_t;
-const char *FILENAME[] = {"app_ref", NULL};
+static const char *FILENAME[] = {"app_ref", NULL};
-const char *IDNAME[T_NUMCLASSES] = {"File", "Property List", "Property Class", "Datatype",
- "Dataspace", "Dataset", "Attribute", "Group",
- "Error Class", "Error Message", "Error Stack"};
+static const char *IDNAME[T_NUMCLASSES] = {"File", "Property List", "Property Class", "Datatype",
+ "Dataspace", "Dataset", "Attribute", "Group",
+ "Error Class", "Error Message", "Error Stack"};
-int rc[T_NUMCLASSES];
+static int rc[T_NUMCLASSES];
void Abrt_Handler(int sig);
diff --git a/test/btree2.c b/test/btree2.c
index 36182f2..2a38675 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -27,7 +27,7 @@
#include "H5CXprivate.h" /* API Contexts */
#include "H5VLprivate.h" /* Virtual Object Layer */
-const char *FILENAME[] = {"btree2", "btree2_tmp", NULL};
+static const char *FILENAME[] = {"btree2", "btree2_tmp", NULL};
#define INSERT_SPLIT_ROOT_NREC 63
#define INSERT_SPLIT_ROOT_NREC_REC 64
diff --git a/test/cache.c b/test/cache.c
index fce0ef1..80052a4 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -53,7 +53,7 @@ hbool_t core_file_driver_failed = FALSE;
/* global variable declarations: */
-const char *FILENAME[] = {"cache_test", NULL};
+static const char *FILENAME[] = {"cache_test", NULL};
/* private typedef declarations: */
@@ -11290,7 +11290,7 @@ check_expunge_entry(unsigned paged)
size_t entry_size;
H5F_t *file_ptr = NULL;
test_entry_t *base_addr;
- test_entry_t *entry_ptr;
+ test_entry_t *entry_ptr = NULL;
if (paged)
TESTING("H5C_expunge_entry() functionality (paged aggregation)");
@@ -11563,7 +11563,7 @@ check_multiple_read_protect(unsigned paged)
#if H5C_COLLECT_CACHE_STATS
H5C_t *cache_ptr = NULL;
#endif /* H5C_COLLECT_CACHE_STATS */
- test_entry_t *entry_ptr;
+ test_entry_t *entry_ptr = NULL;
if (paged)
TESTING("multiple read only protects on a single entry (paged aggr)");
@@ -14156,8 +14156,8 @@ static unsigned
check_double_pin_err(unsigned paged)
{
herr_t result;
- H5F_t *file_ptr = NULL;
- test_entry_t *entry_ptr;
+ H5F_t *file_ptr = NULL;
+ test_entry_t *entry_ptr = NULL;
if (paged)
TESTING("pin a pinned entry error (paged aggregation)");
@@ -14241,8 +14241,8 @@ static unsigned
check_double_unpin_err(unsigned paged)
{
herr_t result;
- H5F_t *file_ptr = NULL;
- test_entry_t *entry_ptr;
+ H5F_t *file_ptr = NULL;
+ test_entry_t *entry_ptr = NULL;
if (paged)
TESTING("unpin an unpinned entry error (paged aggregation)");
@@ -14335,8 +14335,8 @@ static unsigned
check_pin_entry_errs(unsigned paged)
{
herr_t result;
- H5F_t *file_ptr = NULL;
- test_entry_t *entry_ptr;
+ H5F_t *file_ptr = NULL;
+ test_entry_t *entry_ptr = NULL;
if (paged)
TESTING("pin entry related errors (paged aggregation)");
@@ -14442,8 +14442,8 @@ check_pin_entry_errs(unsigned paged)
static unsigned
check_double_protect_err(unsigned paged)
{
- H5F_t *file_ptr = NULL;
- test_entry_t *entry_ptr;
+ H5F_t *file_ptr = NULL;
+ test_entry_t *entry_ptr = NULL;
H5C_cache_entry_t *cache_entry_ptr;
if (paged)
@@ -14525,8 +14525,8 @@ static unsigned
check_double_unprotect_err(unsigned paged)
{
herr_t result;
- H5F_t *file_ptr = NULL;
- test_entry_t *entry_ptr;
+ H5F_t *file_ptr = NULL;
+ test_entry_t *entry_ptr = NULL;
if (paged)
TESTING("unprotect an unprotected entry error (paged aggregation)");
@@ -14606,8 +14606,8 @@ static unsigned
check_mark_entry_dirty_errs(unsigned paged)
{
herr_t result;
- H5F_t *file_ptr = NULL;
- test_entry_t *entry_ptr;
+ H5F_t *file_ptr = NULL;
+ test_entry_t *entry_ptr = NULL;
if (paged)
TESTING("mark entry dirty related errors (paged aggregation)");
@@ -14685,8 +14685,8 @@ static unsigned
check_expunge_entry_errs(unsigned paged)
{
herr_t result;
- H5F_t *file_ptr = NULL;
- test_entry_t *entry_ptr;
+ H5F_t *file_ptr = NULL;
+ test_entry_t *entry_ptr = NULL;
if (paged)
TESTING("expunge entry related errors (paged aggregation)");
@@ -14797,12 +14797,12 @@ static unsigned
check_move_entry_errs(unsigned paged)
{
herr_t result;
- H5F_t *file_ptr = NULL;
- H5C_t *cache_ptr = NULL;
- test_entry_t *entry_ptr = NULL;
- test_entry_t *entry_0_0_ptr;
- test_entry_t *entry_0_1_ptr;
- test_entry_t *entry_1_0_ptr;
+ H5F_t *file_ptr = NULL;
+ H5C_t *cache_ptr = NULL;
+ test_entry_t *entry_ptr = NULL;
+ test_entry_t *entry_0_0_ptr = NULL;
+ test_entry_t *entry_0_1_ptr = NULL;
+ test_entry_t *entry_1_0_ptr = NULL;
if (paged)
TESTING("move entry related errors (paged aggregation)");
@@ -14914,8 +14914,8 @@ static unsigned
check_resize_entry_errs(unsigned paged)
{
herr_t result;
- H5F_t *file_ptr = NULL;
- test_entry_t *entry_ptr;
+ H5F_t *file_ptr = NULL;
+ test_entry_t *entry_ptr = NULL;
if (paged)
TESTING("resize entry related errors (paged aggregation)");
@@ -15015,8 +15015,8 @@ static unsigned
check_unprotect_ro_dirty_err(unsigned paged)
{
herr_t result;
- H5F_t *file_ptr = NULL;
- test_entry_t *entry_ptr;
+ H5F_t *file_ptr = NULL;
+ test_entry_t *entry_ptr = NULL;
if (paged)
TESTING("unprotect a read only entry dirty error (paged aggregation)");
@@ -15135,8 +15135,8 @@ check_unprotect_ro_dirty_err(unsigned paged)
static unsigned
check_protect_ro_rw_err(unsigned paged)
{
- H5F_t *file_ptr = NULL;
- test_entry_t *entry_ptr;
+ H5F_t *file_ptr = NULL;
+ test_entry_t *entry_ptr = NULL;
void *thing_ptr = NULL;
if (paged)
diff --git a/test/cache_api.c b/test/cache_api.c
index b596534..9e09b86 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -23,7 +23,7 @@
/* global variable declarations: */
-const char *FILENAME[] = {"cache_api_test", NULL};
+static const char *FILENAME[] = {"cache_api_test", NULL};
/* macro definitions */
diff --git a/test/cache_common.c b/test/cache_common.c
index d755e1e..82ef9e4 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -3024,7 +3024,7 @@ mark_entry_dirty(int32_t type, int32_t idx)
void
move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr)
{
- herr_t result;
+ herr_t result = 0;
hbool_t done = TRUE; /* will set to FALSE if we have work to do */
haddr_t old_addr = HADDR_UNDEF;
haddr_t new_addr = HADDR_UNDEF;
@@ -4946,7 +4946,7 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
int64_t cache_hits = 0;
int64_t cache_accesses = 0;
double expected_hit_rate;
- double hit_rate;
+ double hit_rate = 0.0;
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
@@ -5059,15 +5059,15 @@ check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_c
{
herr_t result;
size_t expected_max_size;
- size_t max_size;
+ size_t max_size = 0;
size_t expected_min_clean_size;
- size_t min_clean_size;
+ size_t min_clean_size = 0;
size_t expected_cur_size;
- size_t cur_size;
+ size_t cur_size = 0;
uint32_t expected_cur_num_entries;
- int cur_num_entries;
- H5F_t *file_ptr = NULL;
- H5C_t *cache_ptr = NULL;
+ int cur_num_entries = 0;
+ H5F_t *file_ptr = NULL;
+ H5C_t *cache_ptr = NULL;
/* get a pointer to the files internal data structure */
if (pass) {
diff --git a/test/cache_image.c b/test/cache_image.c
index 8072eda..b9b5a29 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -21,7 +21,7 @@
/* global variable declarations: */
-const char *FILENAMES[] = {"cache_image_test", NULL};
+static const char *FILENAMES[] = {"cache_image_test", NULL};
/* local utility function declarations */
static void create_datasets(hid_t file_id, int min_dset, int max_dset);
diff --git a/test/cache_logging.c b/test/cache_logging.c
index 7092110..42427c7 100644
--- a/test/cache_logging.c
+++ b/test/cache_logging.c
@@ -16,7 +16,7 @@
#define LOG_LOCATION "cache_logging.out"
-const char *FILENAME[] = {"cache_logging", NULL};
+static const char *FILENAME[] = {"cache_logging", NULL};
#define N_GROUPS 100
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 71260a8..e1656a2 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -547,11 +547,11 @@ check_file_open_tags(hid_t fcpl, int type)
/* Variable Declarations */
hid_t fid = -1; /* File Identifier */
#ifndef NDEBUG
- int verbose = FALSE; /* verbose file output */
-#endif /* NDEBUG */
- hid_t fapl = -1; /* File access prop list */
- haddr_t root_tag; /* Root Group Tag */
- haddr_t sbe_tag; /* Sblock Extension Tag */
+ int verbose = FALSE; /* verbose file output */
+#endif /* NDEBUG */
+ hid_t fapl = -1; /* File access prop list */
+ haddr_t root_tag; /* Root Group Tag */
+ haddr_t sbe_tag = HADDR_UNDEF; /* Sblock Extension Tag */
/* Testing Macro */
TESTING("tag application during file open");
diff --git a/test/chunk_info.c b/test/chunk_info.c
index 5a53d92..1018132 100644
--- a/test/chunk_info.c
+++ b/test/chunk_info.c
@@ -47,13 +47,13 @@
#endif
/* Test file names, using H5F_libver_t as indices */
-const char *FILENAME[] = {"tchunk_info_earliest",
- "tchunk_info_v18",
- "tchunk_info_v110",
- "tchunk_info_v112",
- "tchunk_info_v114",
- "tchunk_info_v116",
- NULL};
+static const char *FILENAME[] = {"tchunk_info_earliest",
+ "tchunk_info_v18",
+ "tchunk_info_v110",
+ "tchunk_info_v112",
+ "tchunk_info_v114",
+ "tchunk_info_v116",
+ NULL};
/* File to be used in test_failed_attempts */
#define FILTERMASK_FILE "tflt_msk"
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 73d0459..226b526 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -24,7 +24,7 @@
#include "h5test.h"
-const char *FILENAME[] = {"cmpd_dset", "src_subset", "dst_subset", NULL};
+static const char *FILENAME[] = {"cmpd_dset", "src_subset", "dst_subset", NULL};
const char *DSET_NAME[] = {"contig_src_subset", "chunk_src_subset", "contig_dst_subset", "chunk_dst_subset",
NULL};
diff --git a/test/cross_read.c b/test/cross_read.c
index 2c82306..8e9bff0 100644
--- a/test/cross_read.c
+++ b/test/cross_read.c
@@ -21,7 +21,7 @@
#include "h5test.h"
#include "H5srcdir.h"
-const char *FILENAME[] = {"vms_data", "le_data", "be_data", NULL};
+static const char *FILENAME[] = {"vms_data", "le_data", "be_data", NULL};
#define DATASETNAME "Array_le"
#define DATASETNAME1 "Array_be"
diff --git a/test/dangle.c b/test/dangle.c
index 05d7110..a51e347 100644
--- a/test/dangle.c
+++ b/test/dangle.c
@@ -18,7 +18,7 @@
*/
#include "h5test.h"
-const char *FILENAME[] = {"dangle", NULL};
+static const char *FILENAME[] = {"dangle", NULL};
#define MAX_DANGLE 1000
diff --git a/test/del_many_dense_attrs.c b/test/del_many_dense_attrs.c
index 806c25f..9ef4447 100644
--- a/test/del_many_dense_attrs.c
+++ b/test/del_many_dense_attrs.c
@@ -19,7 +19,7 @@
#include "h5test.h"
/* The test file name */
-const char *FILENAME[] = {"del_many_dense_attrs", NULL};
+static const char *FILENAME[] = {"del_many_dense_attrs", NULL};
#define ATTR_COUNT 64 /* The number of attributes */
diff --git a/test/direct_chunk.c b/test/direct_chunk.c
index c3037a7..58e76a3 100644
--- a/test/direct_chunk.c
+++ b/test/direct_chunk.c
@@ -86,7 +86,7 @@ static size_t filter_bogus2(unsigned int flags, size_t cd_nelmts, const unsigned
size_t nbytes, size_t *buf_size, void **buf);
/* This message derives from H5Z */
-const H5Z_class2_t H5Z_BOGUS1[1] = {{
+static const H5Z_class2_t H5Z_BOGUS1[1] = {{
H5Z_CLASS_T_VERS, /* H5Z_class_t version */
H5Z_FILTER_BOGUS1, /* Filter id number */
1, 1, /* Encoding and decoding enabled */
@@ -96,7 +96,7 @@ const H5Z_class2_t H5Z_BOGUS1[1] = {{
filter_bogus1, /* The actual filter function */
}};
-const H5Z_class2_t H5Z_BOGUS2[1] = {{
+static const H5Z_class2_t H5Z_BOGUS2[1] = {{
H5Z_CLASS_T_VERS, /* H5Z_class_t version */
H5Z_FILTER_BOGUS2, /* Filter id number */
1, 1, /* Encoding and decoding enabled */
diff --git a/test/dsets.c b/test/dsets.c
index 63ceb4d..c4693d1 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -55,36 +55,36 @@
#include "szlib.h"
#endif
-const char *FILENAME[] = {"dataset", /* 0 */
- "compact_dataset", /* 1 */
- "dset_offset", /* 2 */
- "max_compact_dataset", /* 3 */
- "simple", /* 4 */
- "set_local", /* 5 */
- "random_chunks", /* 6 */
- "huge_chunks", /* 7 */
- "chunk_cache", /* 8 */
- "big_chunk", /* 9 */
- "chunk_fast", /* 10 */
- "chunk_expand", /* 11 */
- "chunk_fixed", /* 12 */
- "copy_dcpl_newfile", /* 13 */
- "partial_chunks", /* 14 */
- "layout_extend", /* 15 */
- "zero_chunk", /* 16 */
- "chunk_single", /* 17 */
- "swmr_non_latest", /* 18 */
- "earray_hdr_fd", /* 19 */
- "farray_hdr_fd", /* 20 */
- "bt2_hdr_fd", /* 21 */
- "storage_size", /* 22 */
- "dls_01_strings", /* 23 */
- "power2up", /* 24 */
- "version_bounds", /* 25 */
- "alloc_0sized", /* 26 */
- "h5s_block", /* 27 */
- "h5s_plist", /* 28 */
- NULL};
+static const char *FILENAME[] = {"dataset", /* 0 */
+ "compact_dataset", /* 1 */
+ "dset_offset", /* 2 */
+ "max_compact_dataset", /* 3 */
+ "simple", /* 4 */
+ "set_local", /* 5 */
+ "random_chunks", /* 6 */
+ "huge_chunks", /* 7 */
+ "chunk_cache", /* 8 */
+ "big_chunk", /* 9 */
+ "chunk_fast", /* 10 */
+ "chunk_expand", /* 11 */
+ "chunk_fixed", /* 12 */
+ "copy_dcpl_newfile", /* 13 */
+ "partial_chunks", /* 14 */
+ "layout_extend", /* 15 */
+ "zero_chunk", /* 16 */
+ "chunk_single", /* 17 */
+ "swmr_non_latest", /* 18 */
+ "earray_hdr_fd", /* 19 */
+ "farray_hdr_fd", /* 20 */
+ "bt2_hdr_fd", /* 21 */
+ "storage_size", /* 22 */
+ "dls_01_strings", /* 23 */
+ "power2up", /* 24 */
+ "version_bounds", /* 25 */
+ "alloc_0sized", /* 26 */
+ "h5s_block", /* 27 */
+ "h5s_plist", /* 28 */
+ NULL};
#define OHMIN_FILENAME_A "ohdr_min_a"
diff --git a/test/dt_arith.c b/test/dt_arith.c
index b9b8830..5a25b64 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -45,7 +45,7 @@
#endif
#define SET_ALIGNMENT(TYPE, VAL) H5T_NATIVE_##TYPE##_ALIGN_g = MAX(H5T_NATIVE_##TYPE##_ALIGN_g, VAL)
-const char *FILENAME[] = {"dt_arith1", "dt_arith2", NULL};
+static const char *FILENAME[] = {"dt_arith1", "dt_arith2", NULL};
/*
* Count up or down depending on whether the machine is big endian or little
diff --git a/test/dtypes.c b/test/dtypes.c
index c7d845d..ead76de 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -76,8 +76,8 @@
} \
} while (0)
-const char *FILENAME[] = {"dtypes0", "dtypes1", "dtypes2", "dtypes3", "dtypes4", "dtypes5",
- "dtypes6", "dtypes7", "dtypes8", "dtypes9", "dtypes10", NULL};
+static const char *FILENAME[] = {"dtypes0", "dtypes1", "dtypes2", "dtypes3", "dtypes4", "dtypes5",
+ "dtypes6", "dtypes7", "dtypes8", "dtypes9", "dtypes10", NULL};
#define TESTFILE "bad_compound.h5"
@@ -3953,27 +3953,32 @@ test_query(void)
HDprintf("Can't create enumerate type\n");
goto error;
} /* end if */
- if (H5Tenum_insert(tid2, "RED", (enum_val = 10, &enum_val)) < 0) {
+ enum_val = 10;
+ if (H5Tenum_insert(tid2, "RED", &enum_val) < 0) {
H5_FAILED();
HDprintf("Can't insert field into enumeration type\n");
goto error;
} /* end if */
- if (H5Tenum_insert(tid2, "GREEN", (enum_val = 11, &enum_val)) < 0) {
+ enum_val = 11;
+ if (H5Tenum_insert(tid2, "GREEN", &enum_val) < 0) {
H5_FAILED();
HDprintf("Can't insert field into enumeration type\n");
goto error;
} /* end if */
- if (H5Tenum_insert(tid2, "BLUE", (enum_val = 12, &enum_val)) < 0) {
+ enum_val = 12;
+ if (H5Tenum_insert(tid2, "BLUE", &enum_val) < 0) {
H5_FAILED();
HDprintf("Can't insert field into enumeration type\n");
goto error;
} /* end if */
- if (H5Tenum_insert(tid2, "ORANGE", (enum_val = 13, &enum_val)) < 0) {
+ enum_val = 13;
+ if (H5Tenum_insert(tid2, "ORANGE", &enum_val) < 0) {
H5_FAILED();
HDprintf("Can't insert field into enumeration type\n");
goto error;
} /* end if */
- if (H5Tenum_insert(tid2, "YELLOW", (enum_val = 14, &enum_val)) < 0) {
+ enum_val = 14;
+ if (H5Tenum_insert(tid2, "YELLOW", &enum_val) < 0) {
H5_FAILED();
HDprintf("Can't insert field into enumeration type\n");
goto error;
@@ -5267,7 +5272,8 @@ test_conv_enum_1(void)
for (i = 0; i < 26; i++) {
s[0] = (char)('A' + i);
H5Tenum_insert(t1, s, &i);
- H5Tenum_insert(t2, s, (val = i * 1000 + i, &val));
+ val = i * 1000 + i;
+ H5Tenum_insert(t2, s, &val);
} /* end for */
/* Initialize the buffer */
@@ -6043,27 +6049,32 @@ test_encode(void)
HDprintf("Can't create enumerate type\n");
goto error;
}
- if (H5Tenum_insert(tid2, "RED", (enum_val = 0, &enum_val)) < 0) {
+ enum_val = 0;
+ if (H5Tenum_insert(tid2, "RED", &enum_val) < 0) {
H5_FAILED();
HDprintf("Can't insert field into enumeration type\n");
goto error;
}
- if (H5Tenum_insert(tid2, "GREEN", (enum_val = 1, &enum_val)) < 0) {
+ enum_val = 1;
+ if (H5Tenum_insert(tid2, "GREEN", &enum_val) < 0) {
H5_FAILED();
HDprintf("Can't insert field into enumeration type\n");
goto error;
}
- if (H5Tenum_insert(tid2, "BLUE", (enum_val = 2, &enum_val)) < 0) {
+ enum_val = 2;
+ if (H5Tenum_insert(tid2, "BLUE", &enum_val) < 0) {
H5_FAILED();
HDprintf("Can't insert field into enumeration type\n");
goto error;
}
- if (H5Tenum_insert(tid2, "ORANGE", (enum_val = 3, &enum_val)) < 0) {
+ enum_val = 3;
+ if (H5Tenum_insert(tid2, "ORANGE", &enum_val) < 0) {
H5_FAILED();
HDprintf("Can't insert field into enumeration type\n");
goto error;
}
- if (H5Tenum_insert(tid2, "YELLOW", (enum_val = 4, &enum_val)) < 0) {
+ enum_val = 4;
+ if (H5Tenum_insert(tid2, "YELLOW", &enum_val) < 0) {
H5_FAILED();
HDprintf("Can't insert field into enumeration type\n");
goto error;
diff --git a/test/earray.c b/test/earray.c
index 1f82058..5e0fdef 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -161,7 +161,7 @@ typedef struct earray_test_t {
/* Local prototypes */
/* Local variables */
-const char *FILENAME[] = {"earray", "earray_tmp", NULL};
+static const char *FILENAME[] = {"earray", "earray_tmp", NULL};
/* Filename to use for all tests */
char filename_g[EARRAY_FILENAME_LEN];
diff --git a/test/efc.c b/test/efc.c
index c29cddb..1033469 100644
--- a/test/efc.c
+++ b/test/efc.c
@@ -22,7 +22,7 @@
#include "H5Iprivate.h"
#include "H5Pprivate.h" /* Property lists */
-const char *FILENAME[] = {"efc0", "efc1", "efc2", "efc3", "efc4", "efc5", NULL};
+static const char *FILENAME[] = {"efc0", "efc1", "efc2", "efc3", "efc4", "efc5", NULL};
/* Windows doesn't have PATH_MAX */
#ifndef PATH_MAX
diff --git a/test/enum.c b/test/enum.c
index 24f8160..0798e6c 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -19,7 +19,7 @@
/* Convenience macro for inserting enum values */
#define CPTR(VAR, CONST) ((VAR) = (CONST), &(VAR))
-const char *FILENAME[] = {"enum1", NULL};
+static const char *FILENAME[] = {"enum1", NULL};
typedef enum { E1_RED, E1_GREEN, E1_BLUE, E1_WHITE, E1_BLACK } c_e1;
diff --git a/test/err_compat.c b/test/err_compat.c
index 500b69f..b550b84 100644
--- a/test/err_compat.c
+++ b/test/err_compat.c
@@ -27,15 +27,15 @@ main(void)
}
#else /* H5_NO_DEPRECATED_SYMBOLS */
-const char *FILENAME[] = {"errors_compat", NULL};
+static const char *FILENAME[] = {"errors_compat", NULL};
#define DIM0 100
#define DIM1 200
-int **ipoints2 = NULL;
-int **icheck2 = NULL;
-int *ipoints2_data = NULL;
-int *icheck2_data = NULL;
+static int **ipoints2 = NULL;
+static int **icheck2 = NULL;
+static int *ipoints2_data = NULL;
+static int *icheck2_data = NULL;
#define DSET_NAME "a_dataset"
diff --git a/test/error_test.c b/test/error_test.c
index 1bcbcd4..97802a3 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -28,31 +28,31 @@ main(void)
}
#else /* H5_USE_16_API */
-const char *FILENAME[] = {"errors", NULL};
+static const char *FILENAME[] = {"errors", NULL};
#define DATAFILE "filter_error"
#define DIM0 100
#define DIM1 200
-int **ipoints2 = NULL;
-int **icheck2 = NULL;
-int *ipoints2_data = NULL;
-int *icheck2_data = NULL;
+static int **ipoints2 = NULL;
+static int **icheck2 = NULL;
+static int *ipoints2_data = NULL;
+static int *icheck2_data = NULL;
-hid_t ERR_CLS;
-hid_t ERR_CLS2;
-hid_t ERR_STACK;
+static hid_t ERR_CLS;
+static hid_t ERR_CLS2;
+static hid_t ERR_STACK;
-hid_t ERR_MAJ_TEST;
-hid_t ERR_MAJ_IO;
-hid_t ERR_MAJ_API;
+static hid_t ERR_MAJ_TEST;
+static hid_t ERR_MAJ_IO;
+static hid_t ERR_MAJ_API;
-hid_t ERR_MIN_SUBROUTINE;
-hid_t ERR_MIN_ERRSTACK;
-hid_t ERR_MIN_CREATE;
-hid_t ERR_MIN_WRITE;
-hid_t ERR_MIN_GETNUM;
+static hid_t ERR_MIN_SUBROUTINE;
+static hid_t ERR_MIN_ERRSTACK;
+static hid_t ERR_MIN_CREATE;
+static hid_t ERR_MIN_WRITE;
+static hid_t ERR_MIN_GETNUM;
#define DSET_NAME "a_dataset"
#define FAKE_ID (hid_t)0
diff --git a/test/event_set.c b/test/event_set.c
index e9bd070..134002e 100644
--- a/test/event_set.c
+++ b/test/event_set.c
@@ -21,9 +21,9 @@
#define EVENT_SET_NUM_CONNECTOR_IDS 2
-const char *FILENAME[] = {"event_set_1", NULL};
+static const char *FILENAME[] = {"event_set_1", NULL};
-hid_t connector_ids_g[EVENT_SET_NUM_CONNECTOR_IDS];
+static hid_t connector_ids_g[EVENT_SET_NUM_CONNECTOR_IDS];
herr_t fake_wait_request_wait(void *req, uint64_t timeout, H5VL_request_status_t *status);
herr_t fake_wait_request_free(void *req);
diff --git a/test/extend.c b/test/extend.c
index 33d68b7..f4ce116 100644
--- a/test/extend.c
+++ b/test/extend.c
@@ -19,7 +19,7 @@
#include "h5test.h"
-const char *FILENAME[] = {"extend", NULL};
+static const char *FILENAME[] = {"extend", NULL};
#define N1X 100 /* USE AN EVEN NUMBER! */
#define N1Y 100 /* USE AN EVEN NUMBER! */
diff --git a/test/farray.c b/test/farray.c
index 0f522fb..5448865 100644
--- a/test/farray.c
+++ b/test/farray.c
@@ -95,7 +95,7 @@ struct farray_test_param_t {
};
/* Local variables */
-const char *FILENAME[] = {"farray", "farray_tmp", NULL};
+static const char *FILENAME[] = {"farray", "farray_tmp", NULL};
/* Filename to use for all tests */
char filename_g[FARRAY_FILENAME_LEN];
diff --git a/test/fheap.c b/test/fheap.c
index f256ec9..fb1c569 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -89,7 +89,7 @@
#define NUM_PB_FS 6
#define PAGE_BUFFER_PAGE_SIZE 4096
-const char *FILENAME[] = {"fheap", NULL};
+static const char *FILENAME[] = {"fheap", NULL};
/* Types of tests to perform */
typedef enum {
diff --git a/test/file_image.c b/test/file_image.c
index 638ec8d..60cd186 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -43,19 +43,19 @@
#define USERBLOCK_SIZE 512
-const char *FILENAME[] = {"file_image_core_test", NULL};
+static const char *FILENAME[] = {"file_image_core_test", NULL};
/* need a second file name array, as the first file name array contains
* files we don't want to delete on cleanup.
*/
-const char *FILENAME2[] = {"sec2_get_file_image_test",
- "stdio_get_file_image_test",
- "core_get_file_image_test",
- "family_get_file_image_test",
- "multi_get_file_image_test",
- "split_get_file_image_test",
- "get_file_image_error_rejection_test",
- NULL};
+static const char *FILENAME2[] = {"sec2_get_file_image_test",
+ "stdio_get_file_image_test",
+ "core_get_file_image_test",
+ "family_get_file_image_test",
+ "multi_get_file_image_test",
+ "split_get_file_image_test",
+ "get_file_image_error_rejection_test",
+ NULL};
typedef struct {
unsigned char used_callbacks; /* Bitfield for tracking callbacks */
diff --git a/test/fillval.c b/test/fillval.c
index a9f4297..52b15ff 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -25,8 +25,8 @@
*/
/* #define NO_FILLING */
-const char *FILENAME[] = {"fillval_1", "fillval_2", "fillval_3", "fillval_4", "fillval_5",
- "fillval_6", "fillval_7", "fillval_8", "fillval_9", NULL};
+static const char *FILENAME[] = {"fillval_1", "fillval_2", "fillval_3", "fillval_4", "fillval_5",
+ "fillval_6", "fillval_7", "fillval_8", "fillval_9", NULL};
/* Common type for compound datatype operations */
typedef struct {
@@ -873,8 +873,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
int i, j, *buf = NULL, odd;
unsigned u;
comp_datatype rd_c, fill_c, should_be_c;
- comp_datatype *buf_c = NULL;
- H5D_space_status_t allocation;
+ comp_datatype *buf_c = NULL;
+ H5D_space_status_t allocation = H5D_SPACE_STATUS_ERROR;
fill_c.a = 0;
fill_c.x = 0;
diff --git a/test/filter_fail.c b/test/filter_fail.c
index f2f1c3d..c58731e 100644
--- a/test/filter_fail.c
+++ b/test/filter_fail.c
@@ -25,7 +25,7 @@
#define DIM 10
#define FILTER_CHUNK_DIM 2
-const char *FILENAME[] = {"filter_fail_with_cache", "filter_fail_without_cache", NULL};
+static const char *FILENAME[] = {"filter_fail_with_cache", "filter_fail_without_cache", NULL};
static size_t filter_fail(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes,
size_t *buf_size, void **buf);
diff --git a/test/filter_plugin.c b/test/filter_plugin.c
index 1e853e7..c09d196 100644
--- a/test/filter_plugin.c
+++ b/test/filter_plugin.c
@@ -30,7 +30,7 @@
#define FILTER3_ID 259
#define FILTER4_ID 260
-const char *FILENAME[] = {"filter_plugin", NULL};
+static const char *FILENAME[] = {"filter_plugin", NULL};
#define FILENAME_BUF_SIZE 1024
/* Dataset names */
@@ -50,10 +50,10 @@ const char *FILENAME[] = {"filter_plugin", NULL};
#define HYPERSLAB_SIZE2 50
/* Global size arrays */
-const hsize_t sizes_g[2] = {DSET_DIM1, DSET_DIM2}; /* Dataset dimensions */
-const hsize_t hs_sizes_g[2] = {HYPERSLAB_SIZE1, HYPERSLAB_SIZE2}; /* Hyperslab sizes */
-const hsize_t hs_offsets_g[2] = {HYPERSLAB_OFFSET1, HYPERSLAB_OFFSET2}; /* Hyperslab offsets */
-const hsize_t chunk_sizes_g[2] = {CHUNK_DIM1, CHUNK_DIM2}; /* Chunk dimensions */
+static const hsize_t sizes_g[2] = {DSET_DIM1, DSET_DIM2}; /* Dataset dimensions */
+static const hsize_t hs_sizes_g[2] = {HYPERSLAB_SIZE1, HYPERSLAB_SIZE2}; /* Hyperslab sizes */
+static const hsize_t hs_offsets_g[2] = {HYPERSLAB_OFFSET1, HYPERSLAB_OFFSET2}; /* Hyperslab offsets */
+static const hsize_t chunk_sizes_g[2] = {CHUNK_DIM1, CHUNK_DIM2}; /* Chunk dimensions */
/* Limit random number within 20000 */
#define RANDOM_LIMIT 20000
@@ -64,10 +64,10 @@ const hsize_t chunk_sizes_g[2] = {CHUNK_DIM1, CHUNK_DIM2}; /* Chun
#define TOP_LEVEL_GROUP_NAME "top-level group"
/* Global arrays in which to save data */
-int **orig_deflate_g = NULL;
-int **orig_dynlib1_g = NULL;
-int **orig_dynlib2_g = NULL;
-int **orig_dynlib4_g = NULL;
+static int **orig_deflate_g = NULL;
+static int **orig_dynlib1_g = NULL;
+static int **orig_dynlib2_g = NULL;
+static int **orig_dynlib4_g = NULL;
/*-------------------------------------------------------------------------
* Function: free_2D_array
diff --git a/test/flush1.c b/test/flush1.c
index f9fcf9c..f64dfac 100644
--- a/test/flush1.c
+++ b/test/flush1.c
@@ -27,9 +27,9 @@
#define H5FD_TESTING
#include "H5FDpkg.h" /* File drivers */
-const char *FILENAME[] = {"flush", "flush-swmr", "noflush",
- "noflush-swmr", "flush_extend", "flush_extend-swmr",
- "noflush_extend", "noflush_extend-swmr", NULL};
+static const char *FILENAME[] = {"flush", "flush-swmr", "noflush",
+ "noflush-swmr", "flush_extend", "flush_extend-swmr",
+ "noflush_extend", "noflush_extend-swmr", NULL};
/* Number and size of dataset dims, chunk size, etc. */
#define NDIMS 1
diff --git a/test/flush2.c b/test/flush2.c
index bc5d409..48c3247 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -30,9 +30,9 @@
/* This is used in the helper routine clear_status_flags() */
#define H5F_ACS_CLEAR_STATUS_FLAGS_NAME "clear_status_flags"
-const char *FILENAME[] = {"flush", "flush-swmr", "noflush",
- "noflush-swmr", "flush_extend", "flush_extend-swmr",
- "noflush_extend", "noflush_extend-swmr", NULL};
+static const char *FILENAME[] = {"flush", "flush-swmr", "noflush",
+ "noflush-swmr", "flush_extend", "flush_extend-swmr",
+ "noflush_extend", "noflush_extend-swmr", NULL};
/* Number and size of dataset dims, chunk size, etc. */
#define NELEMENTS 10000
diff --git a/test/flushrefresh.c b/test/flushrefresh.c
index 5201404..1f5ee89 100644
--- a/test/flushrefresh.c
+++ b/test/flushrefresh.c
@@ -66,7 +66,7 @@
For errors occurring in the spawned process (from the test script), use
the PROCESS_ERROR macro, which will send a signal to the main process so the
main process can propagate errors correctly. */
-FILE *errorfile;
+static FILE *errorfile;
#define ERRFILE "flushrefresh_ERROR"
#define PROCESS_ERROR \
{ \
diff --git a/test/freespace.c b/test/freespace.c
index e163152..bd1737a 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -58,7 +58,7 @@
#define FSPACE_THRHD_DEF 1 /* Default: no alignment threshold */
#define FSPACE_ALIGN_DEF 1 /* Default: no alignment */
-const char *FILENAME[] = {"frspace", NULL};
+static const char *FILENAME[] = {"frspace", NULL};
typedef struct frspace_state_t {
hsize_t tot_space; /* Total amount of space tracked */
diff --git a/test/gen_bad_compound.c b/test/gen_bad_compound.c
index e103aa2..500cb47 100644
--- a/test/gen_bad_compound.c
+++ b/test/gen_bad_compound.c
@@ -26,7 +26,7 @@
#define FILENAME "bad_compound.h5"
int
-main()
+main(void)
{
hid_t file;
hid_t cmpd_dt;
diff --git a/test/gen_mergemsg.c b/test/gen_mergemsg.c
index b8d5e99..932c054 100644
--- a/test/gen_mergemsg.c
+++ b/test/gen_mergemsg.c
@@ -36,7 +36,7 @@
#define ATTR3_LEN 1
int
-main()
+main(void)
{
hid_t fid; /* File ID */
hid_t gid, gid2, gid3; /* Group IDs */
diff --git a/test/genall5.c b/test/genall5.c
index ea96d32..648dc92 100644
--- a/test/genall5.c
+++ b/test/genall5.c
@@ -1067,7 +1067,7 @@ os_grp_0(hid_t fid, const char *group_name)
{
hid_t gid = -1;
hid_t fapl = -1;
- H5F_libver_t low, high;
+ H5F_libver_t low = H5F_LIBVER_ERROR, high = H5F_LIBVER_ERROR;
herr_t ret;
@@ -1273,7 +1273,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
hid_t gid = -1;
unsigned u;
hid_t fapl = -1;
- H5F_libver_t low, high;
+ H5F_libver_t low = H5F_LIBVER_ERROR, high = H5F_LIBVER_ERROR;
herr_t ret;
if (pass) { /* get the file's file access property list */
diff --git a/test/getname.c b/test/getname.c
index 7900279..5960e5c 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -35,7 +35,7 @@ typedef struct s1_t {
float c;
} s1_t;
-const char *FILENAME[] = {"getname", "getname1", "getname2", "getname3", NULL};
+static const char *FILENAME[] = {"getname", "getname1", "getname2", "getname3", NULL};
#define NAME_BUF_SIZE 64
#define SMALL_NAME_BUF_SIZE 2
diff --git a/test/gheap.c b/test/gheap.c
index 5a37f9e..f8766df 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -47,7 +47,7 @@
} /* end if */ \
} while (0) /* end GHEAP_REPEATED_ERR */
-const char *FILENAME[] = {"gheap1", "gheap2", "gheap3", "gheap4", "gheapooo", NULL};
+static const char *FILENAME[] = {"gheap1", "gheap2", "gheap3", "gheap4", "gheapooo", NULL};
/*-------------------------------------------------------------------------
* Function: test_1
diff --git a/test/istore.c b/test/istore.c
index b688acd..98ef839 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -28,7 +28,7 @@
#include "H5Oprivate.h"
#include "H5VMprivate.h"
-const char *FILENAME[] = {"istore", NULL};
+static const char *FILENAME[] = {"istore", NULL};
#define TEST_SMALL 0x0001
#define TEST_MEDIUM 0x0002
diff --git a/test/lheap.c b/test/lheap.c
index c527fe2..e8e7724 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -24,7 +24,7 @@
#include "H5Iprivate.h"
#include "H5VLprivate.h" /* Virtual Object Layer */
-const char *FILENAME[] = {"lheap", NULL};
+static const char *FILENAME[] = {"lheap", NULL};
#define TESTFILE "tsizeslheap.h5"
diff --git a/test/links.c b/test/links.c
index 2ab7f59..b865275 100644
--- a/test/links.c
+++ b/test/links.c
@@ -46,61 +46,61 @@
#define SYMLINK1 TMPDIR "sym1.h5"
#define SYMLINK2 TMPDIR2 "sym2.h5"
-const char *FILENAME[] = {"links0",
- "links1",
- "links2",
- "links3",
- "links4a", /* 4 */
- "links4b", /* 5 */
- "links4c", /* 6 */
- "links4d", /* 7 */
- "links5", /* 8 */
- "links6", /* 9 */
- "links7", /* 10 */
- "links8", /* 11 */
- "extlinks0", /* 12: main files */
- TMPDIR "extlinks0", /* 13: */
- "extlinks1", /* 14: target files */
- TMPDIR "extlinks1", /* 15: */
- "extlinks2", /* 16: */
- TMPDIR "extlinks2", /* 17: */
- "extlinks3", /* 18: */
- TMPDIR "extlinks3", /* 19: */
- "extlinks4", /* 20: */
- TMPDIR "extlinks4", /* 21: */
- "extlinks5", /* 22: */
- TMPDIR "extlinks6", /* 23: */
- "extlinks7", /* 24: */
- TMPDIR "extlinks7", /* 25: */
- TMPDIR "extlinks8", /* 26: */
- "extlinks9", /* 27: */
- TMPDIR "extlinks9", /* 28: */
- "extlinks10",
- /* 29: */ /* TESTS for windows */
- TMPDIR "extlinks10", /* 30: */
- TMPDIR "extlinks11", /* 31: */
- TMPDIR "extlinks12", /* 32: */
- "extlinks13", /* 33: */
- TMPDIR "extlinks13", /* 34: */
- TMPDIR "extlinks14", /* 35: */
- TMPDIR "extlinks15", /* 36: */
- "extlinks16A",
- /* 37: */ /* TESTS for H5P_set_elink_fapl */
- "extlinks16B", /* 38: */
- "extlinks17", /* 39: */
- "extlinks18A", /* 40: */
- "extlinks18B", /* 41: */
- "extlinks19A", /* 42: */
- "extlinks19B", /* 43: */
- "extlinks20", /* 44: */
- "extlinks21A", /* 45: Files for symlink() tests*/
- TMPDIR2 "extlinks21B", /* 46: */
- TMPDIR2 "extlinks21C", /* 47: */
- "extlinks21C", /* 48: (same as #47, only without the TMPDIR2 prefix) */
- TMPDIR "extlinks21D", /* 49: */
- TMPDIR "extlinks21E", /* 50: */
- "extlinks21E", /* 51: (same as #50, only without the TMPDIR prefix) */
- NULL};
+static const char *FILENAME[] = {"links0",
+ "links1",
+ "links2",
+ "links3",
+ "links4a", /* 4 */
+ "links4b", /* 5 */
+ "links4c", /* 6 */
+ "links4d", /* 7 */
+ "links5", /* 8 */
+ "links6", /* 9 */
+ "links7", /* 10 */
+ "links8", /* 11 */
+ "extlinks0", /* 12: main files */
+ TMPDIR "extlinks0", /* 13: */
+ "extlinks1", /* 14: target files */
+ TMPDIR "extlinks1", /* 15: */
+ "extlinks2", /* 16: */
+ TMPDIR "extlinks2", /* 17: */
+ "extlinks3", /* 18: */
+ TMPDIR "extlinks3", /* 19: */
+ "extlinks4", /* 20: */
+ TMPDIR "extlinks4", /* 21: */
+ "extlinks5", /* 22: */
+ TMPDIR "extlinks6", /* 23: */
+ "extlinks7", /* 24: */
+ TMPDIR "extlinks7", /* 25: */
+ TMPDIR "extlinks8", /* 26: */
+ "extlinks9", /* 27: */
+ TMPDIR "extlinks9", /* 28: */
+ "extlinks10",
+ /* 29: */ /* TESTS for windows */
+ TMPDIR "extlinks10", /* 30: */
+ TMPDIR "extlinks11", /* 31: */
+ TMPDIR "extlinks12", /* 32: */
+ "extlinks13", /* 33: */
+ TMPDIR "extlinks13", /* 34: */
+ TMPDIR "extlinks14", /* 35: */
+ TMPDIR "extlinks15", /* 36: */
+ "extlinks16A",
+ /* 37: */ /* TESTS for H5P_set_elink_fapl */
+ "extlinks16B", /* 38: */
+ "extlinks17", /* 39: */
+ "extlinks18A", /* 40: */
+ "extlinks18B", /* 41: */
+ "extlinks19A", /* 42: */
+ "extlinks19B", /* 43: */
+ "extlinks20", /* 44: */
+ "extlinks21A", /* 45: Files for symlink() tests*/
+ TMPDIR2 "extlinks21B", /* 46: */
+ TMPDIR2 "extlinks21C", /* 47: */
+ "extlinks21C", /* 48: (same as #47, only without the TMPDIR2 prefix) */
+ TMPDIR "extlinks21D", /* 49: */
+ TMPDIR "extlinks21E", /* 50: */
+ "extlinks21E", /* 51: (same as #50, only without the TMPDIR prefix) */
+ NULL};
#define FAMILY_SIZE 1024
#define CORE_INCREMENT 1024
diff --git a/test/links_env.c b/test/links_env.c
index 69a35f6..db10269 100644
--- a/test/links_env.c
+++ b/test/links_env.c
@@ -25,10 +25,10 @@
#define TMPDIR "tmp_links_env/"
#define NAME_BUF_SIZE 1024
-const char *FILENAME[] = {"extlinks_env0", /* 0: main file */
- "extlinks_env1", /* 1: target file */
- TMPDIR "extlinks_env1", /* 2 */
- NULL};
+static const char *FILENAME[] = {"extlinks_env0", /* 0: main file */
+ "extlinks_env1", /* 1: target file */
+ TMPDIR "extlinks_env1", /* 2 */
+ NULL};
static int external_link_env(hid_t fapl, hbool_t new_format);
diff --git a/test/mdset.c b/test/mdset.c
index 06e7af2..ceeea1a 100644
--- a/test/mdset.c
+++ b/test/mdset.c
@@ -47,7 +47,7 @@
(MDSET_FLAG_CHUNK | MDSET_FLAG_MLAYOUT | MDSET_FLAG_SHAPESAME | MDSET_FLAG_MDSET | MDSET_FLAG_TCONV | \
MDSET_FLAG_FILTER)
-const char *FILENAME[] = {"mdset", "mdset1", "mdset2", NULL};
+static const char *FILENAME[] = {"mdset", "mdset1", "mdset2", NULL};
/* Names for datasets */
char dset_name[MAX_DSETS][DSET_MAX_NAME_LEN];
diff --git a/test/mf.c b/test/mf.c
index a154c42..69caf25 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -98,7 +98,7 @@
#define TEST_THRESHOLD10 10
#define TEST_THRESHOLD3 3
-const char *FILENAME[] = {"mf", NULL};
+static const char *FILENAME[] = {"mf", NULL};
typedef enum {
TEST_NORMAL, /* size of aggregator is >= alignment size */
@@ -367,8 +367,8 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size = 0, new_file_size; /* file size */
- H5FD_mem_t type;
- haddr_t addr = 0;
+ H5FD_mem_t type = H5FD_MEM_DEFAULT;
+ haddr_t addr = 0;
haddr_t ma_addr = HADDR_UNDEF, new_ma_addr = HADDR_UNDEF;
hsize_t ma_size = 0, new_ma_size = 0;
hbool_t suitable_vfd;
diff --git a/test/mount.c b/test/mount.c
index 8ea5fe9..9cb65c9 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -20,14 +20,15 @@
#include "H5Fprivate.h" /* File access */
#include "H5Iprivate.h" /* IDs */
-const char *FILENAME[] = {"mount_1", "mount_2", "mount_3", "mount_4", "mount_5", "mount_6", "mount_7", NULL};
+static const char *FILENAME[] = {"mount_1", "mount_2", "mount_3", "mount_4",
+ "mount_5", "mount_6", "mount_7", NULL};
/* For "mount_after_close" test */
#define RANK 2
#define NX 4
#define NY 5
#define NAME_BUF_SIZE 40
-int bm[NX][NY], bm_out[NX][NY]; /* Data buffers */
+static int bm[NX][NY]; /* Data buffers */
/*-------------------------------------------------------------------------
* Function: setup
diff --git a/test/mtime.c b/test/mtime.c
index 882189e..5b5fc4e 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -22,7 +22,7 @@
#include "h5test.h"
#include "H5srcdir.h"
-const char *FILENAME[] = {"mtime", NULL};
+static const char *FILENAME[] = {"mtime", NULL};
#define TESTFILE1 "tmtimeo.h5"
#define MTIME1 1055531866
diff --git a/test/ntypes.c b/test/ntypes.c
index decd1c2..aa90828 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -19,7 +19,7 @@
#include "h5test.h"
-const char *FILENAME[] = {"ntypes", NULL};
+static const char *FILENAME[] = {"ntypes", NULL};
#define DIM0 100
#define DIM1 200
diff --git a/test/objcopy.c b/test/objcopy.c
index d5c4947..187b04a 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -60,8 +60,8 @@
#define H5O_TESTING
#include "H5Opkg.h" /* Object header */
-const char *FILENAME[] = {"objcopy_src", "objcopy_dst", "objcopy_ext", "objcopy_src2",
- "verbound_src", "verbound_dst", NULL};
+static const char *FILENAME[] = {"objcopy_src", "objcopy_dst", "objcopy_ext", "objcopy_src2",
+ "verbound_src", "verbound_dst", NULL};
/* Configuration, really a series of bit flags. Maximum value is all three
* bit flags enabled.
diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c
index 3ad5091..73c611e 100644
--- a/test/objcopy_ref.c
+++ b/test/objcopy_ref.c
@@ -23,13 +23,13 @@
#define H5F_TESTING
#include "H5Fpkg.h" /* File access */
-const char *FILENAME[] = {"objcopy_ref_src",
- "objcopy_ref_dst",
- "objcopy_ref_ext",
- "objcopy_ref_src2",
- "verbound_ref_src",
- "verbound_ref_dst",
- NULL};
+static const char *FILENAME[] = {"objcopy_ref_src",
+ "objcopy_ref_dst",
+ "objcopy_ref_ext",
+ "objcopy_ref_src2",
+ "verbound_ref_src",
+ "verbound_ref_dst",
+ NULL};
/* Configuration, really a series of bit flags. Maximum value is all three
* bit flags enabled.
diff --git a/test/ohdr.c b/test/ohdr.c
index b62f391..a15b8a0 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -40,7 +40,7 @@
#define H5FD_TESTING
#include "H5FDpkg.h"
-const char *FILENAME[] = {"ohdr", "ohdr_min_a", "ohdr_min_b", NULL};
+static const char *FILENAME[] = {"ohdr", "ohdr_min_a", "ohdr_min_b", NULL};
/* used for object header size comparison */
#define EQ 1
diff --git a/test/onion.c b/test/onion.c
index 830220d..da1eb12 100644
--- a/test/onion.c
+++ b/test/onion.c
@@ -91,18 +91,18 @@ static unsigned int flags_create_s = 0;
*/
/* twenty-six four-character words beginning with 'a' -> 104 bytes */
-const unsigned char *a_list_s =
+static const unsigned char *a_list_s =
(const unsigned char *)"abetableacedacesacheacidacneadzeafaragedagesaidsairsajarallyalum"
"amokantsapesarcsareaartsasksaspsavidaxes";
uint64_t a_list_size_s = 104;
/* fifty-three four-character words beginning with 'b' -> 212 bytes */
-const unsigned char *b_list_s =
+static const unsigned char *b_list_s =
(const unsigned char *)"badebailbaitbalebanebarebaskbeambeanbearbeenbeerbeltbentbestbide"
"bikebilebindbirdbiteblipblueboarboatbobsbodyboilboldbollboltbond"
"boneboobboorboosbootbradbragbratbraybrewbritbrowbuckbudsbunkbunt"
"buoyburnburybustbuys";
-uint64_t b_list_size_s = 212;
+static uint64_t b_list_size_s = 212;
/* Allocate and populate filepaths with h5_fixname'd strings as appropriate.
* Should be released with onion_filepaths_destroy() when done.
@@ -912,9 +912,10 @@ test_header_encode_decode(void)
ptr = exp + H5FD_ONION_ENCODED_SIZE_HEADER - 4;
UINT32ENCODE(ptr, checksum);
- hdr.version = H5FD_ONION_HEADER_VERSION_CURR;
- hdr.flags = 12;
- hdr.origin_eof = 8589934609ull, hdr.page_size = 4096;
+ hdr.version = H5FD_ONION_HEADER_VERSION_CURR;
+ hdr.flags = 12;
+ hdr.origin_eof = 8589934609ull;
+ hdr.page_size = 4096;
hdr.history_addr = 123456;
hdr.history_size = 88;
diff --git a/test/page_buffer.c b/test/page_buffer.c
index b15aff5..16fcfd5 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -56,7 +56,7 @@ static unsigned create_file(char *filename, hid_t fcpl, hid_t fapl);
static unsigned open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size);
#endif /* H5_HAVE_PARALLEL */
-const char *FILENAME[] = {"filepaged", NULL};
+static const char *FILENAME[] = {"filepaged", NULL};
#ifndef H5_HAVE_PARALLEL
diff --git a/test/reserved.c b/test/reserved.c
index a820344..7ebe60c 100644
--- a/test/reserved.c
+++ b/test/reserved.c
@@ -13,7 +13,7 @@
#include "h5test.h"
#ifdef BROKEN
-const char *FILENAME[] = {"rsrv_heap", "rsrv_ohdr", "rsrv_vlen", NULL};
+static const char *FILENAME[] = {"rsrv_heap", "rsrv_ohdr", "rsrv_vlen", NULL};
/*-------------------------------------------------------------------------
* Function: rsrv_heap
diff --git a/test/set_extent.c b/test/set_extent.c
index 4dc5d7c..f4758b5 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -26,8 +26,8 @@
*-------------------------------------------------------------------------
*/
-const char *FILENAME[] = {"set_extent1", "set_extent2", "set_extent3", "set_extent4",
- "set_extent5", "set_extent6", NULL};
+static const char *FILENAME[] = {"set_extent1", "set_extent2", "set_extent3", "set_extent4",
+ "set_extent5", "set_extent6", NULL};
#define NAME_BUF_SIZE 1024
#define EXT_FILE_NAME1 "ext1.bin"
diff --git a/test/stab.c b/test/stab.c
index 45010d5..dcd2791 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -23,7 +23,7 @@
#include "h5test.h"
#include "H5Gpkg.h" /* Groups */
-const char *FILENAME[] = {"stab", NULL};
+static const char *FILENAME[] = {"stab", NULL};
#define NAME_BUF_SIZE 1024
diff --git a/test/swmr.c b/test/swmr.c
index 94110f4..4fdf8d0 100644
--- a/test/swmr.c
+++ b/test/swmr.c
@@ -48,10 +48,10 @@
#define H5O_TESTING
#include "H5Opkg.h" /* Object headers */
-const char *FILENAME[] = {"swmr0", /* 0 */
- "swmr1", /* 1 */
- "swmr2", /* 2 */
- NULL};
+static const char *FILENAME[] = {"swmr0", /* 0 */
+ "swmr1", /* 1 */
+ "swmr2", /* 2 */
+ NULL};
#define NAME_BUF_SIZE 1024 /* Length of file name */
diff --git a/test/tattr.c b/test/tattr.c
index 6f3ecb4..9151b26 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -76,24 +76,25 @@
#define ATTR1_NAME "Attr1"
#define ATTR1_RANK 1
#define ATTR1_DIM1 3
-int attr_data1[ATTR1_DIM1] = {512, -234, 98123}; /* Test data for 1st attribute */
+static int attr_data1[ATTR1_DIM1] = {512, -234, 98123}; /* Test data for 1st attribute */
/* rank & dimensions for another attribute */
#define ATTR1A_NAME "Attr1_a"
-int attr_data1a[ATTR1_DIM1] = {256, 11945, -22107};
+static int attr_data1a[ATTR1_DIM1] = {256, 11945, -22107};
#define ATTR2_NAME "Attr2"
#define ATTR2_RANK 2
#define ATTR2_DIM1 2
#define ATTR2_DIM2 2
-int attr_data2[ATTR2_DIM1][ATTR2_DIM2] = {{7614, -416}, {197814, -3}}; /* Test data for 2nd attribute */
+static int attr_data2[ATTR2_DIM1][ATTR2_DIM2] = {{7614, -416},
+ {197814, -3}}; /* Test data for 2nd attribute */
#define ATTR3_NAME "Attr3"
#define ATTR3_RANK 3
#define ATTR3_DIM1 2
#define ATTR3_DIM2 2
#define ATTR3_DIM3 2
-double attr_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3] = {
+static double attr_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3] = {
{{2.3, -26.1}, {0.123, -10.0}}, {{973.23, -0.91827}, {2.0, 23.0}}}; /* Test data for 3rd attribute */
#define ATTR4_NAME "Attr4"
@@ -103,10 +104,10 @@ double attr_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3] = {
#define ATTR4_FIELDNAME1 "i"
#define ATTR4_FIELDNAME2 "d"
#define ATTR4_FIELDNAME3 "c"
-size_t attr4_field1_off = 0;
-size_t attr4_field2_off = 0;
-size_t attr4_field3_off = 0;
-struct attr4_struct {
+static size_t attr4_field1_off = 0;
+static size_t attr4_field2_off = 0;
+static size_t attr4_field3_off = 0;
+static struct attr4_struct {
int i;
double d;
char c;
@@ -116,7 +117,7 @@ struct attr4_struct {
#define ATTR5_NAME "Attr5"
#define ATTR5_RANK 0
-float attr_data5 = -5.123F; /* Test data for 5th attribute */
+static float attr_data5 = -5.123F; /* Test data for 5th attribute */
#define ATTR6_RANK 3
#define ATTR6_DIM1 100
@@ -4540,21 +4541,21 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
static void
test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Compact Storage of Attributes with Creation Order Info\n"));
@@ -4742,23 +4743,23 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
static void
test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Dense Storage of Attributes with Creation Order Info\n"));
@@ -5079,23 +5080,23 @@ test_attr_corder_create_reopen(hid_t fcpl, hid_t fapl)
static void
test_attr_corder_transition(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Storage Transitions of Attributes with Creation Order Info\n"));
@@ -5488,24 +5489,24 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
static void
test_attr_corder_delete(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- unsigned reopen_file; /* Whether to re-open the file before deleting group */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ unsigned reopen_file; /* Whether to re-open the file before deleting group */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Deleting Object w/Dense Attribute Storage and Creation Order Info\n"));
@@ -5810,26 +5811,26 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
static void
test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- H5A_info_t ainfo; /* Attribute information */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- unsigned use_index; /* Use index on creation order values */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ H5A_info_t ainfo; /* Attribute information */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ unsigned use_index; /* Use index on creation order values */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
@@ -6292,28 +6293,28 @@ test_attr_get_name_invalid_buf(hid_t fcpl, hid_t fapl)
static void
test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- H5A_info_t ainfo; /* Attribute information */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ H5A_info_t ainfo; /* Attribute information */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
MESSAGE(5, ("Testing Deleting Attribute By Index\n"));
@@ -7273,30 +7274,30 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
static void
test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- attr_iter_info_t iter_info; /* Iterator info */
- hbool_t *visited = NULL; /* Array of flags for visiting links */
- hsize_t idx; /* Start index for iteration */
- unsigned use_index; /* Use index on creation order values */
- const char *dsetname; /* Name of dataset for attributes */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ attr_iter_info_t iter_info; /* Iterator info */
+ hbool_t *visited = NULL; /* Array of flags for visiting links */
+ hsize_t idx; /* Start index for iteration */
+ unsigned use_index; /* Use index on creation order values */
+ const char *dsetname; /* Name of dataset for attributes */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
@@ -7680,27 +7681,27 @@ attr_open_by_idx_check(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
static void
test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- hid_t ret_id; /* Generic hid_t return value */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ hid_t ret_id; /* Generic hid_t return value */
+ herr_t ret; /* Generic return value */
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
@@ -8054,26 +8055,26 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id, unsigned max_attr
static void
test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- unsigned use_index; /* Use index on creation order values */
- const char *dsetname; /* Name of dataset for attributes */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- hid_t ret_id; /* Generic hid_t return value */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ unsigned use_index; /* Use index on creation order values */
+ const char *dsetname; /* Name of dataset for attributes */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ hid_t ret_id; /* Generic hid_t return value */
+ herr_t ret; /* Generic return value */
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
@@ -8350,25 +8351,25 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
static void
test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- unsigned use_index; /* Use index on creation order values */
- const char *dsetname; /* Name of dataset for attributes */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ unsigned use_index; /* Use index on creation order values */
+ const char *dsetname; /* Name of dataset for attributes */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
diff --git a/test/tcheck_version.c b/test/tcheck_version.c
index 2d5c239..f14c61c 100644
--- a/test/tcheck_version.c
+++ b/test/tcheck_version.c
@@ -38,9 +38,9 @@ void parse(int ac, char **av);
void abort_intercept(int H5_ATTR_UNUSED sig);
/* global variables */
-unsigned major = H5_VERS_MAJOR;
-unsigned minor = H5_VERS_MINOR;
-unsigned release = H5_VERS_RELEASE;
+static unsigned major = H5_VERS_MAJOR;
+static unsigned minor = H5_VERS_MINOR;
+static unsigned release = H5_VERS_RELEASE;
void
showhelp(void)
diff --git a/test/tcoords.c b/test/tcoords.c
index 230db60..0be11e4 100644
--- a/test/tcoords.c
+++ b/test/tcoords.c
@@ -33,7 +33,7 @@
/* Data written to the dataset for single block test. Global variable
* for convenience. */
-int da_buffer[2][3][6][2];
+static int da_buffer[2][3][6][2];
/***********************************************************
**
diff --git a/test/testframe.c b/test/testframe.c
index cb730b7..90d975e 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -221,7 +221,7 @@ TestParseCmdLine(int argc, char *argv[])
hbool_t skipped_all = FALSE;
int ret_code;
- while (argv++, --argc > 0) {
+ while ((void)argv++, --argc > 0) {
if ((HDstrcmp(*argv, "-verbose") == 0) || (HDstrcmp(*argv, "-v") == 0)) {
if (argc > 0) {
--argc;
diff --git a/test/tfile.c b/test/tfile.c
index ac931cc..4bb2d82 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -142,14 +142,14 @@
#define FILE8 "tfile8.h5" /* Test file */
/* Files created under 1.6 branch and 1.8 branch--used in test_filespace_compatible() */
-const char *OLD_FILENAME[] = {
+static const char *OLD_FILENAME[] = {
"filespace_1_6.h5", /* 1.6 HDF5 file */
"filespace_1_8.h5" /* 1.8 HDF5 file */
};
/* Files created in 1.10.0 release --used in test_filespace_1.10.0_compatible() */
/* These files are copied from release 1.10.0 tools/h5format_convert/testfiles */
-const char *OLD_1_10_0_FILENAME[] = {
+static const char *OLD_1_10_0_FILENAME[] = {
"h5fc_ext1_i.h5", /* 0 */
"h5fc_ext1_f.h5", /* 1 */
"h5fc_ext2_if.h5", /* 2 */
@@ -159,7 +159,7 @@ const char *OLD_1_10_0_FILENAME[] = {
};
/* Files used in test_filespace_round_compatible() */
-const char *FSPACE_FILENAMES[] = {
+static const char *FSPACE_FILENAMES[] = {
"fsm_aggr_nopersist.h5", /* H5F_FILE_SPACE_AGGR, not persisting free-space */
"fsm_aggr_persist.h5", /* H5F_FILE_SPACE_AGGR, persisting free-space */
"paged_nopersist.h5", /* H5F_FILE_SPACE_PAGE, not persisting free-space */
@@ -168,7 +168,7 @@ const char *FSPACE_FILENAMES[] = {
"none.h5" /* H5F_FILE_SPACE_NONE */
};
-const char *FILESPACE_NAME[] = {"tfilespace", NULL};
+static const char *FILESPACE_NAME[] = {"tfilespace", NULL};
/* Declarations for test_libver_bounds_copy(): */
/* SRC_FILE: source file created under 1.8 branch with latest format */
diff --git a/test/tgenprop.c b/test/tgenprop.c
index 5751ce7..7bfd590 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -39,22 +39,22 @@
/* Property definitions */
#define PROP1_NAME "Property 1"
-int prop1_def = 10; /* Property 1 default value */
+static int prop1_def = 10; /* Property 1 default value */
#define PROP1_SIZE sizeof(prop1_def)
#define PROP1_DEF_VALUE (&prop1_def)
#define PROP2_NAME "Property 2"
-float prop2_def = 3.14F; /* Property 2 default value */
+static float prop2_def = 3.14F; /* Property 2 default value */
#define PROP2_SIZE sizeof(prop2_def)
#define PROP2_DEF_VALUE (&prop2_def)
#define PROP3_NAME "Property 3"
-char prop3_def[10] = "Ten chars"; /* Property 3 default value */
+static char prop3_def[10] = "Ten chars"; /* Property 3 default value */
#define PROP3_SIZE sizeof(prop3_def)
#define PROP3_DEF_VALUE (&prop3_def)
#define PROP4_NAME "Property 4"
-double prop4_def = 1.41; /* Property 4 default value */
+static double prop4_def = 1.41; /* Property 4 default value */
#define PROP4_SIZE sizeof(prop4_def)
#define PROP4_DEF_VALUE (&prop4_def)
@@ -996,9 +996,9 @@ typedef struct {
} prop_cb_info;
/* Global variables for Callback information */
-prop_cb_info prop1_cb_info; /* Callback statistics for property #1 */
-prop_cb_info prop2_cb_info; /* Callback statistics for property #2 */
-prop_cb_info prop3_cb_info; /* Callback statistics for property #3 */
+static prop_cb_info prop1_cb_info; /* Callback statistics for property #1 */
+static prop_cb_info prop2_cb_info; /* Callback statistics for property #2 */
+static prop_cb_info prop3_cb_info; /* Callback statistics for property #3 */
/****************************************************************
**
diff --git a/test/th5s.c b/test/th5s.c
index 31944e6..7e9d216 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -74,18 +74,18 @@
/* Scalar dataset with simple datatype */
#define SPACE3_RANK 0
-unsigned space3_data = 65;
+static unsigned space3_data = 65;
/* Scalar dataset with compound datatype */
#define SPACE4_FIELDNAME1 "c1"
#define SPACE4_FIELDNAME2 "u"
#define SPACE4_FIELDNAME3 "f"
#define SPACE4_FIELDNAME4 "c2"
-size_t space4_field1_off = 0;
-size_t space4_field2_off = 0;
-size_t space4_field3_off = 0;
-size_t space4_field4_off = 0;
-struct space4_struct {
+static size_t space4_field1_off = 0;
+static size_t space4_field2_off = 0;
+static size_t space4_field3_off = 0;
+static size_t space4_field4_off = 0;
+static struct space4_struct {
char c1;
unsigned u;
float f;
diff --git a/test/tid.c b/test/tid.c
index ef1e201..6b7bb0b 100644
--- a/test/tid.c
+++ b/test/tid.c
@@ -872,7 +872,7 @@ typedef struct {
} future_obj_t;
/* Global (static) future ID object type */
-H5I_type_t future_obj_type_g = H5I_BADID;
+static H5I_type_t future_obj_type_g = H5I_BADID;
/* Callback to free the actual object for future object test */
static herr_t
diff --git a/test/tmeta.c b/test/tmeta.c
index d55882d..46474a3 100644
--- a/test/tmeta.c
+++ b/test/tmeta.c
@@ -26,7 +26,7 @@
#define TEST_INT32_VALUE (-981236)
#define TEST_UINT32_VALUE 3476589
-uint8_t compar_buffer[] = {
+static uint8_t compar_buffer[] = {
/* Little-endian encoded version of the 16-bit signed integer */
(uint8_t)((TEST_INT16_VALUE)&0xff),
(uint8_t)((TEST_INT16_VALUE >> 8) & 0xff),
@@ -45,7 +45,7 @@ uint8_t compar_buffer[] = {
(uint8_t)((TEST_UINT32_VALUE >> 24) & 0xff),
};
-uint8_t encode_buffer[sizeof(compar_buffer)];
+static uint8_t encode_buffer[sizeof(compar_buffer)];
/****************************************************************
**
diff --git a/test/tsohm.c b/test/tsohm.c
index 9f2dd50..e8de093 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -26,20 +26,21 @@
/* Default SOHM values */
#define DEF_NUM_INDEXES 0
-const unsigned def_type_flags[H5O_SHMESG_MAX_NINDEXES] = {0, 0, 0, 0, 0, 0};
-const unsigned def_minsizes[H5O_SHMESG_MAX_NINDEXES] = {250, 250, 250, 250, 250, 250};
+static const unsigned def_type_flags[H5O_SHMESG_MAX_NINDEXES] = {0, 0, 0, 0, 0, 0};
+static const unsigned def_minsizes[H5O_SHMESG_MAX_NINDEXES] = {250, 250, 250, 250, 250, 250};
#define DEF_L2B 50
#define DEF_B2L 40
/* Non-default SOHM values for testing */
#define TEST_NUM_INDEXES 4
-const unsigned test_type_flags[H5O_SHMESG_MAX_NINDEXES] = {H5O_SHMESG_FILL_FLAG,
- H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_ATTR_FLAG,
- H5O_SHMESG_SDSPACE_FLAG,
- H5O_SHMESG_PLINE_FLAG,
- 0,
- 0};
-const unsigned test_minsizes[H5O_SHMESG_MAX_NINDEXES] = {0, 2, 40, 100, 3, 1000};
+static const unsigned test_type_flags[H5O_SHMESG_MAX_NINDEXES] = {H5O_SHMESG_FILL_FLAG,
+ H5O_SHMESG_DTYPE_FLAG |
+ H5O_SHMESG_ATTR_FLAG,
+ H5O_SHMESG_SDSPACE_FLAG,
+ H5O_SHMESG_PLINE_FLAG,
+ 0,
+ 0};
+static const unsigned test_minsizes[H5O_SHMESG_MAX_NINDEXES] = {0, 2, 40, 100, 3, 1000};
#define TEST_L2B 65
#define TEST_B2L 64
@@ -69,31 +70,31 @@ typedef struct dtype1_struct {
} dtype1_struct;
#define DTYPE2_SIZE 1024
-const char *DSETNAME[] = {"dataset0", "dataset1", "dataset2", "dataset3", "dataset4",
- "dataset5", "dataset6", "dataset7", "dataset8", "dataset9",
- "dataset10", "dataset11", NULL};
-const char *EXTRA_DSETNAME[] = {"ex_dataset0", "ex_dataset1", "ex_dataset2",
- "ex_dataset3", "ex_dataset4", "ex_dataset5",
- "ex_dataset6", "ex_dataset7", "ex_dataset8",
- "ex_dataset9", "ex_dataset10", "ex_dataset11",
- "ex_dataset12", "ex_dataset13", "ex_dataset14",
- "ex_dataset15", "ex_dataset16", "ex_dataset17",
- "ex_dataset18", "ex_dataset19", NULL};
+static const char *DSETNAME[] = {"dataset0", "dataset1", "dataset2", "dataset3", "dataset4",
+ "dataset5", "dataset6", "dataset7", "dataset8", "dataset9",
+ "dataset10", "dataset11", NULL};
+static const char *EXTRA_DSETNAME[] = {"ex_dataset0", "ex_dataset1", "ex_dataset2",
+ "ex_dataset3", "ex_dataset4", "ex_dataset5",
+ "ex_dataset6", "ex_dataset7", "ex_dataset8",
+ "ex_dataset9", "ex_dataset10", "ex_dataset11",
+ "ex_dataset12", "ex_dataset13", "ex_dataset14",
+ "ex_dataset15", "ex_dataset16", "ex_dataset17",
+ "ex_dataset18", "ex_dataset19", NULL};
#define SOHM_HELPER_NUM_EX_DSETS 20
typedef struct complex_t {
double re;
double im;
} complex_t;
#define ENUM_NUM_MEMBS 20
-const char *ENUM_NAME[] = {"enum_member0", "enum_member1", "enum_member2",
- "enum_member3", "enum_member4", "enum_member5",
- "enum_member6", "enum_member7", "enum_member8",
- "enum_member9", "enum_member10", "enum_member11",
- "enum_member12", "enum_member13", "enum_member14",
- "enum_member15", "enum_member16", "enum_member17",
- "enum_member18", "enum_member19", NULL};
-const int ENUM_VAL[] = {0, 13, -500, 63, 64, -64, 65, 2048, 1, 2, -1,
- 7, 130, -5000, 630, 640, -640, 650, 20480, 10, -1001, -10};
+static const char *ENUM_NAME[] = {"enum_member0", "enum_member1", "enum_member2",
+ "enum_member3", "enum_member4", "enum_member5",
+ "enum_member6", "enum_member7", "enum_member8",
+ "enum_member9", "enum_member10", "enum_member11",
+ "enum_member12", "enum_member13", "enum_member14",
+ "enum_member15", "enum_member16", "enum_member17",
+ "enum_member18", "enum_member19", NULL};
+static const int ENUM_VAL[] = {0, 13, -500, 63, 64, -64, 65, 2048, 1, 2, -1,
+ 7, 130, -5000, 630, 640, -640, 650, 20480, 10, -1001, -10};
#define SIZE2_RANK1 6
#define SIZE2_RANK2 10
#define SIZE2_DIMS \
diff --git a/test/unlink.c b/test/unlink.c
index 50781d9..a8fe2d8 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -25,9 +25,9 @@
#include "h5test.h"
#include "H5Gpkg.h" /* Groups */
-const char *FILENAME[] = {"unlink", "new_move_a", "new_move_b", "lunlink",
- "filespace", "slashes", "resurrect_set", "resurrect_type",
- "resurrect_group", "unlink_chunked", "full_group", NULL};
+static const char *FILENAME[] = {"unlink", "new_move_a", "new_move_b", "lunlink",
+ "filespace", "slashes", "resurrect_set", "resurrect_type",
+ "resurrect_group", "unlink_chunked", "full_group", NULL};
/* Macros for test_create_unlink() & test_filespace */
#define GROUPNAME "group"
diff --git a/test/unregister.c b/test/unregister.c
index db6cfd1..5338b09 100644
--- a/test/unregister.c
+++ b/test/unregister.c
@@ -19,7 +19,7 @@
#include "H5CXprivate.h" /* API Contexts */
-const char *FILENAME[] = {"unregister_filter_1", "unregister_filter_2", NULL};
+static const char *FILENAME[] = {"unregister_filter_1", "unregister_filter_2", NULL};
#define GROUP_NAME "test_group"
#define DSET_NAME "test_dataset"
@@ -36,7 +36,7 @@ static size_t do_nothing(unsigned int flags, size_t cd_nelmts, const unsigned in
size_t *buf_size, void **buf);
/* Dummy filter for test_unregister_filters only */
-const H5Z_class2_t H5Z_DUMMY[1] = {{
+static const H5Z_class2_t H5Z_DUMMY[1] = {{
H5Z_CLASS_T_VERS, /* H5Z_class_t version */
H5Z_FILTER_DUMMY, /* Filter ID number */
1, 1, /* Encoding and decoding enabled */
diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c
index ea674ec..04319ab 100644
--- a/test/use_disable_mdc_flushes.c
+++ b/test/use_disable_mdc_flushes.c
@@ -27,7 +27,7 @@
#include "H5Dpkg.h"
/* Global Variable definitions */
-const char *progname_g = "use_disable_mdc_flushes"; /* program name */
+static const char *progname_g = "use_disable_mdc_flushes"; /* program name */
/* these two definitions must match each other */
#define UC_DATATYPE H5T_NATIVE_SHORT /* use case HDF5 data type */
@@ -40,14 +40,14 @@ const char *progname_g = "use_disable_mdc_flushes"; /* program name */
goto done; \
}
-char *filename_g;
-hsize_t nplanes_g;
-int use_swmr_g;
-int chunkplanes_g;
-int chunksize_g;
-hsize_t dims_g[UC_RANK];
-hsize_t max_dims_g[UC_RANK];
-hsize_t chunkdims_g[UC_RANK];
+static char *filename_g;
+static hsize_t nplanes_g;
+static int use_swmr_g;
+static int chunkplanes_g;
+static int chunksize_g;
+static hsize_t dims_g[UC_RANK];
+static hsize_t max_dims_g[UC_RANK];
+static hsize_t chunkdims_g[UC_RANK];
static void usage(const char *prog);
static int parse_option(int argc, char *const argv[]);
diff --git a/test/vds.c b/test/vds.c
index 9f2ea97..0f3e0b0 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -29,9 +29,9 @@ typedef enum {
TEST_API_NTESTS
} test_api_config_t;
-const char *FILENAME[] = {"vds_virt_0", "vds_virt_1", "vds_src_0", "vds_src_1", "vds%%_src",
- "vds_dapl", "vds_virt_2", "vds_virt_3", "vds_src_2", "vds_src_3",
- "vds%%_src2", "vds_dapl2", NULL};
+static const char *FILENAME[] = {"vds_virt_0", "vds_virt_1", "vds_src_0", "vds_src_1", "vds%%_src",
+ "vds_dapl", "vds_virt_2", "vds_virt_3", "vds_src_2", "vds_src_3",
+ "vds%%_src2", "vds_dapl2", NULL};
/* Define to enable verbose test output */
/* #define VDS_TEST_VERBOSE 1 */
diff --git a/test/vds_env.c b/test/vds_env.c
index 2f362d9..bb95d03 100644
--- a/test/vds_env.c
+++ b/test/vds_env.c
@@ -18,7 +18,7 @@
*/
#include "h5test.h"
-const char *FILENAME[] = {"vds_env_virt_0", "vds_env_virt_3", "vds_env_src_2", "vds_env%%_src2", NULL};
+static const char *FILENAME[] = {"vds_env_virt_0", "vds_env_virt_3", "vds_env_src_2", "vds_env%%_src2", NULL};
/* I/O test config flags */
#define TEST_IO_CLOSE_SRC 0x01u
diff --git a/test/vfd.c b/test/vfd.c
index d8fb5d0..a9cd241 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -47,23 +47,23 @@
#define DSET2_DIM 4
#endif /* H5_HAVE_DIRECT */
-const char *FILENAME[] = {"sec2_file", /*0*/
- "core_file", /*1*/
- "family_file", /*2*/
- "new_family_v16", /*3*/
- "multi_file", /*4*/
- "direct_file", /*5*/
- "log_file", /*6*/
- "stdio_file", /*7*/
- "windows_file", /*8*/
- "new_multi_file_v16", /*9*/
- "ro_s3_file", /*10*/
- "splitter_rw_file", /*11*/
- "splitter_wo_file", /*12*/
- "splitter.log", /*13*/
- "ctl_file", /*14*/
- "ctl_splitter_wo_file", /*15*/
- NULL};
+static const char *FILENAME[] = {"sec2_file", /*0*/
+ "core_file", /*1*/
+ "family_file", /*2*/
+ "new_family_v16", /*3*/
+ "multi_file", /*4*/
+ "direct_file", /*5*/
+ "log_file", /*6*/
+ "stdio_file", /*7*/
+ "windows_file", /*8*/
+ "new_multi_file_v16", /*9*/
+ "ro_s3_file", /*10*/
+ "splitter_rw_file", /*11*/
+ "splitter_wo_file", /*12*/
+ "splitter.log", /*13*/
+ "ctl_file", /*14*/
+ "ctl_splitter_wo_file", /*15*/
+ NULL};
#define LOG_FILENAME "log_vfd_out.log"
diff --git a/test/vol.c b/test/vol.c
index a7c669c..1690614 100644
--- a/test/vol.c
+++ b/test/vol.c
@@ -28,7 +28,7 @@
#include "H5VLpkg.h" /* Virtual Object Layer */
/* Filename */
-const char *FILENAME[] = {"vol_test_file", NULL};
+static const char *FILENAME[] = {"vol_test_file", NULL};
#define NATIVE_VOL_TEST_GROUP_NAME "test_group"
#define NATIVE_VOL_TEST_DATASET_NAME "test_dataset"