summaryrefslogtreecommitdiffstats
path: root/test/stab.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-07-18 11:27:07 (GMT)
committerGitHub <noreply@github.com>2023-07-18 11:27:07 (GMT)
commitaab497a6312a9d8434a7dc7b5a593713fc8fbce0 (patch)
tree018a95afb94dd103dcbef98e4a383382a52968bf /test/stab.c
parent919ce7adc2f24414b749c2a6880da00259350881 (diff)
downloadhdf5-aab497a6312a9d8434a7dc7b5a593713fc8fbce0.zip
hdf5-aab497a6312a9d8434a7dc7b5a593713fc8fbce0.tar.gz
hdf5-aab497a6312a9d8434a7dc7b5a593713fc8fbce0.tar.bz2
Fix some warnings in developer builds (#3247)
* Fix some warnings in developer builds * Switch approach to Winline flag
Diffstat (limited to 'test/stab.c')
-rw-r--r--test/stab.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/stab.c b/test/stab.c
index acfe090..6bdba65 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -188,6 +188,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;
@@ -207,7 +208,7 @@ 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;
+ name2Len = (2 * LONG_NAME_LEN) + 2;
name2 = (char *)malloc(name2Len);
HDsnprintf(name2, name2Len, "%s/%s", name1, name1);