Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleans up a couple of MSVC warnings in testhdf5 #475

Merged
merged 2 commits into from
Mar 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions test/trefstr.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ test_refstr_wrap(void)
/* Get pointer to raw string in ref-counted string */
s = H5RS_get_str(rs);
CHECK_PTR(s, "H5RS_get_str");
CHECK(s, buf, "wrapping");
if (s == buf)
TestErrPrintf("%d: Should not have gotten the same pointer from reference-counted string!\n",
__LINE__);
cmp = HDstrcmp(s, buf);
if (cmp <= 0)
TestErrPrintf("%d: string comparison incorrect!\n", __LINE__);
Expand Down Expand Up @@ -375,7 +377,7 @@ test_refstr_acat(void)

/* Append a large string to ref-counted string */
large_str = HDmalloc(1024);
CHECK(large_str, NULL, "HDmalloc");
CHECK_PTR(large_str, "HDmalloc");
HDmemset(large_str, 'a', 1024);
large_str[1023] = '\0';
ret = H5RS_acat(rs, large_str);
Expand All @@ -386,7 +388,7 @@ test_refstr_acat(void)
CHECK_PTR(s, "H5RS_get_str");
HDsprintf(buf, "%s", "foobar");
large_str2 = HDmalloc(1024 + 6);
CHECK(large_str2, NULL, "HDmalloc");
CHECK_PTR(large_str2, "HDmalloc");
HDstrcpy(large_str2, "foobar");
HDmemset(&large_str2[6], 'a', 1024);
large_str2[1029] = '\0';
Expand Down
4 changes: 2 additions & 2 deletions test/tselect.c
Original file line number Diff line number Diff line change
Expand Up @@ -5363,9 +5363,9 @@ test_select_hyper_union_3d(void)

/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
CHECK(wbuf, NULL, "HDmalloc");
CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE3_DIM1 * SPACE3_DIM2);
CHECK(rbuf, NULL, "HDcalloc");
CHECK_PTR(rbuf, "HDcalloc");

/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE4_DIM1; i++)
Expand Down