summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-07-27 19:11:46 (GMT)
committerGitHub <noreply@github.com>2023-07-27 19:11:46 (GMT)
commit2bb4c909c4c63cf87d10c494cd76d57092d45335 (patch)
treee5da9e282045d3b17921169e00bb4164aa31bedc /test
parent17a5a1a37ccc851ca9123b2921fbae15c4814edf (diff)
downloadhdf5-2bb4c909c4c63cf87d10c494cd76d57092d45335.zip
hdf5-2bb4c909c4c63cf87d10c494cd76d57092d45335.tar.gz
hdf5-2bb4c909c4c63cf87d10c494cd76d57092d45335.tar.bz2
Fix some warnings in developer builds (#3247) (#3291)
* Fix some warnings in developer builds * Switch approach to Winline flag
Diffstat (limited to 'test')
-rw-r--r--test/chunk_info.c4
-rw-r--r--test/h5test.c3
-rw-r--r--test/onion.c3
-rw-r--r--test/stab.c5
4 files changed, 4 insertions, 11 deletions
diff --git a/test/chunk_info.c b/test/chunk_info.c
index 5651b26..77d2b8a 100644
--- a/test/chunk_info.c
+++ b/test/chunk_info.c
@@ -114,10 +114,6 @@ const char *FILENAME[] = {"tchunk_info_earliest", "tchunk_info_v18", "tchunk_in
/* For compressed data */
#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s)) * 1.001) + 12.0)
-/* For use in error reporting */
-#define MSG_CHK_ADDR "Chunk address should not be HADDR_UNDEF because of H5D_ALLOC_TIME_EARLY."
-#define MSG_CHK_SIZE "Chunk size should not be 0 because of H5D_ALLOC_TIME_EARLY."
-
/* Utility function to initialize arguments */
void reinit_vars(unsigned *read_flt_msk, haddr_t *addr, hsize_t *size);
diff --git a/test/h5test.c b/test/h5test.c
index 856de4b..e3a3fb0 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -88,9 +88,6 @@ MPI_Info h5_io_info_g = MPI_INFO_NULL; /* MPI INFO object for IO */
*/
static const char *multi_letters = "msbrglo";
-/* Length of multi-file VFD filename buffers */
-#define H5TEST_MULTI_FILENAME_LEN 1024
-
/* Temporary file for sending signal messages */
#define TMP_SIGNAL_FILE "tmp_signal_file"
diff --git a/test/onion.c b/test/onion.c
index c643c00..1063b67 100644
--- a/test/onion.c
+++ b/test/onion.c
@@ -36,7 +36,6 @@
#define ONION_TEST_PAGE_SIZE_1 4
#define ONION_TEST_PAGE_SIZE_5 32
-#define ONION_TEST_BASENAME_SIZE 32
#define ONION_TEST_FIXNAME_SIZE 1024
#define ONION_TEST_EXPECTED_HISTORY_REVISIONS_MAX 16
#define ONION_TEST_REV_REV_WRITES_MAX 8
@@ -1308,6 +1307,7 @@ test_revision_record_encode_decode(void)
uint64_t size_ret;
H5FD_onion_revision_record_t r_out;
uint32_t checksum = 0;
+ hbool_t badness = FALSE;
char comment[25] = "Example comment message.";
H5FD_onion_revision_record_t record = {
H5FD_ONION_REVISION_RECORD_VERSION_CURR,
@@ -1383,7 +1383,6 @@ test_revision_record_encode_decode(void)
if (H5FD__onion_revision_record_encode(&record, buf, &checksum) != exp_size)
TEST_ERROR;
- hbool_t badness = FALSE;
for (i = 0; i < exp_size; i++) {
if (exp[i] != buf[i]) {
badness = TRUE;
diff --git a/test/stab.c b/test/stab.c
index 697bce0..8daf9cc 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -198,6 +198,7 @@ test_long(hid_t fcpl, hid_t fapl, hbool_t new_format)
{
hid_t fid = (-1); /* File ID */
hid_t g1 = (-1), g2 = (-1);
+ size_t name2Len;
char *name1 = NULL, *name2 = NULL;
char filename[NAME_BUF_SIZE];
size_t i;
@@ -217,8 +218,8 @@ test_long(hid_t fcpl, hid_t fapl, hbool_t new_format)
for (i = 0; i < LONG_NAME_LEN; i++)
name1[i] = (char)('A' + i % 26);
name1[LONG_NAME_LEN - 1] = '\0';
- size_t name2Len = (2 * LONG_NAME_LEN) + 2;
- name2 = (char *)HDmalloc(name2Len);
+ name2Len = (2 * LONG_NAME_LEN) + 2;
+ name2 = (char *)malloc(name2Len);
HDsnprintf(name2, name2Len, "%s/%s", name1, name1);
/* Create groups */