summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/dsets.c3
-rw-r--r--test/flushrefresh.c1
-rw-r--r--test/mf.c6
-rw-r--r--test/plugin.c8
-rw-r--r--test/swmr_remove_reader.c2
-rw-r--r--test/swmr_remove_writer.c2
-rw-r--r--test/tfile.c6
-rw-r--r--test/use_common.c14
8 files changed, 29 insertions, 13 deletions
diff --git a/test/dsets.c b/test/dsets.c
index ba0ad82..12d2e83 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -17,6 +17,8 @@
*
* Purpose: Tests the dataset interface (H5D)
*/
+#define H5D_FRIEND /*suppress error about including H5Dpkg */
+#define H5D_TESTING
#define H5FD_FRIEND /*suppress error about including H5FDpkg */
#define H5FD_TESTING
@@ -24,6 +26,7 @@
#include "h5test.h"
#include "H5srcdir.h"
+#include "H5Dpkg.h"
#include "H5FDpkg.h"
#include "H5VMprivate.h"
#include "H5Zpkg.h"
diff --git a/test/flushrefresh.c b/test/flushrefresh.c
index f35ed5e..0775dee 100644
--- a/test/flushrefresh.c
+++ b/test/flushrefresh.c
@@ -9,6 +9,7 @@
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Mike McGreevy
diff --git a/test/mf.c b/test/mf.c
index 3197989..fea5ee2 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -45,8 +45,10 @@
#define TBLOCK_SIZE4 4
#define TBLOCK_SIZE5 5
#define TBLOCK_SIZE6 6
+#ifdef PB_OUT
#define TBLOCK_SIZE7 7
#define TBLOCK_SIZE8 8
+#endif /* PB_OUT */
#define TBLOCK_SIZE10 10
#define TBLOCK_SIZE11 11
#define TBLOCK_SIZE20 20
@@ -138,8 +140,10 @@ static unsigned test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new
static unsigned test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format);
static unsigned test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format);
static unsigned test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format);
+#ifdef PB_OUT
static unsigned test_mf_fs_persist_split(void);
static unsigned test_mf_fs_persist_multi(void);
+#endif
static unsigned test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl);
static unsigned test_page_small(const char *env_h5_drvr, hid_t fapl);
static unsigned test_page_large(const char *env_h5_drvr, hid_t fapl);
@@ -6091,6 +6095,7 @@ error:
* Verify that the file's free-space manager(s) are persistent for a split-file
*-------------------------------------------------------------------------
*/
+#ifdef PB_OUT
static unsigned
test_mf_fs_persist_split(void)
{
@@ -6716,6 +6721,7 @@ error:
} H5E_END_TRY;
return(1);
} /* test_mf_fs_persist_multi() */
+#endif /* PB_OUT */
/*
*-------------------------------------------------------------------------
diff --git a/test/plugin.c b/test/plugin.c
index 8b4324d..1254e9a 100644
--- a/test/plugin.c
+++ b/test/plugin.c
@@ -574,7 +574,9 @@ test_noread_with_filters(hid_t file)
/* disable filter plugin */
if(H5PLget_loading_state(&plugin_state) < 0) TEST_ERROR
- plugin_state = plugin_state & ~H5PL_FILTER_PLUGIN;
+
+ plugin_state = plugin_state & (unsigned)(~H5PL_FILTER_PLUGIN);
+
if(H5PLset_loading_state(plugin_state) < 0) TEST_ERROR
if((dset = H5Dopen2(file, DSET_DYNLIB1_NAME, H5P_DEFAULT)) < 0) TEST_ERROR
@@ -672,8 +674,8 @@ static herr_t
test_groups_with_filters(hid_t file)
{
herr_t ret_value = -1;
- hid_t gid;
- hid_t group;
+ hid_t gid = -1;
+ hid_t group = -1;
int i;
char gname[256];
diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c
index 11649e3..1fae5e7 100644
--- a/test/swmr_remove_reader.c
+++ b/test/swmr_remove_reader.c
@@ -227,7 +227,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
/* Determine the offset of the symbol, within level 0 symbols */
/* (level 0 symbols are the most common symbols) */
- offset = (unsigned)(HDrandom() % symbol_count[0]);
+ offset = (unsigned)HDrandom() % symbol_count[0];
sym_com[v] = &symbol_info[0][offset];
/* Emit informational message */
diff --git a/test/swmr_remove_writer.c b/test/swmr_remove_writer.c
index 82c2f8b..43743d9 100644
--- a/test/swmr_remove_writer.c
+++ b/test/swmr_remove_writer.c
@@ -187,7 +187,7 @@ remove_records(hid_t fid, unsigned verbose, unsigned long nshrinks, unsigned lon
symbol->nrecords = 0;
else
symbol->nrecords -= remove_size;
- dim[1] = symbol->nrecords;
+ dim[1] = symbol->nrecords;
if(H5Dset_extent(symbol->dsid, dim) < 0)
return -1;
diff --git a/test/tfile.c b/test/tfile.c
index 7274c82..c59e756 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -4929,9 +4929,9 @@ test_libver_bounds(void)
static void
test_libver_macros(void)
{
- unsigned major = H5_VERS_MAJOR;
- unsigned minor = H5_VERS_MINOR;
- unsigned release = H5_VERS_RELEASE;
+ int major = H5_VERS_MAJOR;
+ int minor = H5_VERS_MINOR;
+ int release = H5_VERS_RELEASE;
/* Output message about test being performed */
MESSAGE(5, ("Testing macros for library version comparison\n"));
diff --git a/test/use_common.c b/test/use_common.c
index 908cac9..5aa6692 100644
--- a/test/use_common.c
+++ b/test/use_common.c
@@ -48,6 +48,8 @@ parse_option(int argc, char * const argv[])
{
int ret_value=0;
int c;
+ int use_swmr; /* Need an int to detect errors */
+
/* command line options: See function usage for a description */
const char *nagg_options = "f:hi:l:n:s:y:z:";
@@ -96,11 +98,13 @@ parse_option(int argc, char * const argv[])
};
break;
case 's': /* use swmr file open mode */
- if ((UC_opts.use_swmr = HDatoi(optarg)) < 0) {
- fprintf(stderr, "swmr value should be 0(no) or 1(yes)\n");
- usage(progname_g);
- Hgoto_error(-1);
- };
+ use_swmr = HDatoi(optarg);
+ if (use_swmr != 0 && use_swmr != 1) {
+ HDfprintf(stderr, "swmr value should be 0(no) or 1(yes)\n");
+ usage(progname_g);
+ Hgoto_error(-1);
+ }
+ UC_opts.use_swmr = (hbool_t)use_swmr;
break;
case 'y': /* Number of planes per chunk */
if ((UC_opts.chunkplanes = HDstrtoul(optarg, NULL, 0)) <= 0) {