diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-29 19:33:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-29 19:33:46 (GMT) |
commit | 39e6bf48c92dda00057e2e19cdeed93f5a07b3c8 (patch) | |
tree | 7596e876fd008f38830d04591d49a0328208b0d1 /test/dtypes.c | |
parent | fd933f30b1f8cd487ad790ac0b054bb779280a62 (diff) | |
download | hdf5-39e6bf48c92dda00057e2e19cdeed93f5a07b3c8.zip hdf5-39e6bf48c92dda00057e2e19cdeed93f5a07b3c8.tar.gz hdf5-39e6bf48c92dda00057e2e19cdeed93f5a07b3c8.tar.bz2 |
Remove HD from HDmem* calls (#3211)
Diffstat (limited to 'test/dtypes.c')
-rw-r--r-- | test/dtypes.c | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/test/dtypes.c b/test/dtypes.c index 77a9ecd..21a79a1 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -778,7 +778,7 @@ test_compound_2(void) s_ptr->d = i * 8 + 6; s_ptr->e = i * 8 + 7; } - HDmemcpy(buf, orig, nelmts * sizeof(struct st)); + memcpy(buf, orig, nelmts * sizeof(struct st)); /* Build hdf5 datatypes */ array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, &four); @@ -903,7 +903,7 @@ test_compound_3(void) s_ptr->d = i * 8 + 6; s_ptr->e = i * 8 + 7; } - HDmemcpy(buf, orig, nelmts * sizeof(struct st)); + memcpy(buf, orig, nelmts * sizeof(struct st)); /* Build hdf5 datatypes */ array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, &four); @@ -1028,7 +1028,7 @@ test_compound_4(void) s_ptr->d = (i * 8 + 6) & 0x7fff; s_ptr->e = i * 8 + 7; } - HDmemcpy(buf, orig, nelmts * sizeof(struct st)); + memcpy(buf, orig, nelmts * sizeof(struct st)); /* Build hdf5 datatypes */ array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, &four); @@ -1170,7 +1170,7 @@ test_compound_5(void) H5Tinsert(dst_type, "coll_ids", HOFFSET(dst_type_t, coll_ids), int_array); /* Convert data */ - HDmemcpy(buf, src, sizeof(src)); + memcpy(buf, src, sizeof(src)); H5Tconvert(src_type, dst_type, (size_t)2, buf, bkg, H5P_DEFAULT); dst = (dst_type_t *)buf; @@ -1182,7 +1182,7 @@ test_compound_5(void) H5Tclose(int_array); /* Check results */ - if (HDmemcmp(src[1].name, dst[1].name, sizeof(src[1].name)) != 0 || src[1].tdim != dst[1].tdim || + if (memcmp(src[1].name, dst[1].name, sizeof(src[1].name)) != 0 || src[1].tdim != dst[1].tdim || src[1].coll_ids[0] != dst[1].coll_ids[0] || src[1].coll_ids[1] != dst[1].coll_ids[1] || src[1].coll_ids[2] != dst[1].coll_ids[2] || src[1].coll_ids[3] != dst[1].coll_ids[3]) { H5_FAILED(); @@ -1246,7 +1246,7 @@ test_compound_6(void) s_ptr->b = (int16_t)((i * 8 + 1) & 0x7fff); s_ptr->d = (int16_t)((i * 8 + 6) & 0x7fff); } - HDmemcpy(buf, orig, nelmts * sizeof(struct st)); + memcpy(buf, orig, nelmts * sizeof(struct st)); /* Build hdf5 datatypes */ if ((st = H5Tcreate(H5T_COMPOUND, sizeof(struct st))) < 0 || @@ -2268,7 +2268,7 @@ test_compound_11(void) } /* end for */ /* Make copy of buffer before conversion */ - HDmemcpy(buf_orig, buf, sizeof(big_t) * NTESTELEM); + memcpy(buf_orig, buf, sizeof(big_t) * NTESTELEM); dim[0] = NTESTELEM; if ((space_id = H5Screate_simple(1, dim, NULL)) < 0) { @@ -2335,7 +2335,7 @@ test_compound_11(void) TEST_ERROR; /* Recover the original buffer information */ - HDmemcpy(buf, buf_orig, sizeof(big_t) * NTESTELEM); + memcpy(buf, buf_orig, sizeof(big_t) * NTESTELEM); /* Convert buffer from 'big' to 'little' struct */ if (H5Tconvert(big_tid, little_tid, (size_t)NTESTELEM, buf, bkg, H5P_DEFAULT) < 0) @@ -2376,7 +2376,7 @@ test_compound_11(void) TEST_ERROR; /* Recover the original buffer information */ - HDmemcpy(buf, buf_orig, sizeof(big_t) * NTESTELEM); + memcpy(buf, buf_orig, sizeof(big_t) * NTESTELEM); /* Convert buffer from 'big' to 'little' struct */ if (H5Tconvert(big_tid, little_tid, (size_t)NTESTELEM, buf, bkg, H5P_DEFAULT) < 0) @@ -2568,7 +2568,7 @@ test_compound_13(void) TESTING("compound datatypes of boundary size with latest format"); /* Create some phony data. */ - HDmemset(&data_out, 0, sizeof(data_out)); + memset(&data_out, 0, sizeof(data_out)); for (u = 0; u < COMPOUND13_ARRAY_SIZE + 1; u++) data_out.x[u] = (unsigned char)u; data_out.y = 99.99F; @@ -4646,17 +4646,17 @@ test_conv_str_1(void) goto error; if (NULL == (buf = (char *)calloc((size_t)2, (size_t)10))) goto error; - HDmemcpy(buf, "abcdefghi\0abcdefghi\0", (size_t)20); + memcpy(buf, "abcdefghi\0abcdefghi\0", (size_t)20); if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcd\0abcd\0abcdefghi\0", (size_t)20) != 0) { + if (memcmp(buf, "abcd\0abcd\0abcdefghi\0", (size_t)20) != 0) { H5_FAILED(); HDputs(" Truncated C-string test failed"); goto error; } if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcd\0\0\0\0\0\0abcd\0\0\0\0\0\0", (size_t)20) != 0) { + if (memcmp(buf, "abcd\0\0\0\0\0\0abcd\0\0\0\0\0\0", (size_t)20) != 0) { H5_FAILED(); HDputs(" Extended C-string test failed"); goto error; @@ -4677,17 +4677,17 @@ test_conv_str_1(void) goto error; if (NULL == (buf = (char *)calloc((size_t)2, (size_t)10))) goto error; - HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20); + memcpy(buf, "abcdefghijabcdefghij", (size_t)20); if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) { + if (memcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) { H5_FAILED(); HDputs(" Truncated C buffer test failed"); goto error; } if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) { + if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) { H5_FAILED(); HDputs(" Extended C buffer test failed"); goto error; @@ -4708,17 +4708,17 @@ test_conv_str_1(void) goto error; if (NULL == (buf = (char *)calloc((size_t)2, (size_t)10))) goto error; - HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20); + memcpy(buf, "abcdefghijabcdefghij", (size_t)20); if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) { + if (memcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) { H5_FAILED(); HDputs(" Truncated Fortran-string test failed"); goto error; } if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcde abcde ", (size_t)20) != 0) { + if (memcmp(buf, "abcde abcde ", (size_t)20) != 0) { H5_FAILED(); HDputs(" Extended Fortran-string test failed"); goto error; @@ -4742,10 +4742,10 @@ test_conv_str_1(void) goto error; if (NULL == (buf = (char *)calloc((size_t)2, (size_t)10))) goto error; - HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20); + memcpy(buf, "abcdefghijabcdefghij", (size_t)20); if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) { + if (memcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) { H5_FAILED(); HDputs(" Non-terminated string test 1"); goto error; @@ -4753,18 +4753,18 @@ test_conv_str_1(void) H5Tclose(dst_type); if ((dst_type = mkstr((size_t)5, H5T_STR_NULLTERM)) < 0) goto error; - HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20); + memcpy(buf, "abcdefghijabcdefghij", (size_t)20); if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcd\0abcd\0abcdefghij", (size_t)20) != 0) { + if (memcmp(buf, "abcd\0abcd\0abcdefghij", (size_t)20) != 0) { H5_FAILED(); HDputs(" Non-terminated string test 2"); goto error; } - HDmemcpy(buf, "abcdeabcdexxxxxxxxxx", (size_t)20); + memcpy(buf, "abcdeabcdexxxxxxxxxx", (size_t)20); if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) { + if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) { H5_FAILED(); HDputs(" Non-terminated string test 2"); goto error; @@ -4785,17 +4785,17 @@ test_conv_str_1(void) goto error; if (NULL == (buf = (char *)calloc((size_t)2, (size_t)10))) goto error; - HDmemcpy(buf, "abcdefghi\0abcdefghi\0", (size_t)20); + memcpy(buf, "abcdefghi\0abcdefghi\0", (size_t)20); if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdefghi abcdefghi ", (size_t)20) != 0) { + if (memcmp(buf, "abcdefghi abcdefghi ", (size_t)20) != 0) { H5_FAILED(); HDputs(" C string to Fortran test 1"); goto error; } if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdefghi\0abcdefghi\0", (size_t)20) != 0) { + if (memcmp(buf, "abcdefghi\0abcdefghi\0", (size_t)20) != 0) { H5_FAILED(); HDputs(" Fortran to C string test 1"); goto error; @@ -4804,17 +4804,17 @@ test_conv_str_1(void) goto error; if ((dst_type = mkstr((size_t)5, H5T_STR_SPACEPAD)) < 0) goto error; - HDmemcpy(buf, "abcdefgh\0\0abcdefgh\0\0", (size_t)20); + memcpy(buf, "abcdefgh\0\0abcdefgh\0\0", (size_t)20); if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) { + if (memcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) { H5_FAILED(); HDputs(" C string to Fortran test 2"); goto error; } if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) { + if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) { H5_FAILED(); HDputs(" Fortran to C string test 2"); goto error; @@ -4827,17 +4827,17 @@ test_conv_str_1(void) goto error; if ((dst_type = mkstr((size_t)10, H5T_STR_SPACEPAD)) < 0) goto error; - HDmemcpy(buf, "abcd\0abcd\0xxxxxxxxxx", (size_t)20); + memcpy(buf, "abcd\0abcd\0xxxxxxxxxx", (size_t)20); if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcd abcd ", (size_t)20) != 0) { + if (memcmp(buf, "abcd abcd ", (size_t)20) != 0) { H5_FAILED(); HDputs(" C string to Fortran test 3"); goto error; } if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) { + if (memcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) { H5_FAILED(); HDputs(" Fortran to C string test 3"); goto error; @@ -4858,17 +4858,17 @@ test_conv_str_1(void) goto error; if (NULL == (buf = (char *)calloc((size_t)2, (size_t)10))) goto error; - HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20); + memcpy(buf, "abcdefghijabcdefghij", (size_t)20); if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) { + if (memcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) { H5_FAILED(); HDputs(" C buffer to Fortran test 1"); goto error; } if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) { + if (memcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) { H5_FAILED(); HDputs(" Fortran to C buffer test 1"); goto error; @@ -4877,17 +4877,17 @@ test_conv_str_1(void) goto error; if ((dst_type = mkstr((size_t)5, H5T_STR_SPACEPAD)) < 0) goto error; - HDmemcpy(buf, "abcdefgh\0\0abcdefgh\0\0", (size_t)20); + memcpy(buf, "abcdefgh\0\0abcdefgh\0\0", (size_t)20); if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) { + if (memcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) { H5_FAILED(); HDputs(" C buffer to Fortran test 2"); goto error; } if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) { + if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) { H5_FAILED(); HDputs(" Fortran to C buffer test 2"); goto error; @@ -4900,17 +4900,17 @@ test_conv_str_1(void) goto error; if ((dst_type = mkstr((size_t)10, H5T_STR_SPACEPAD)) < 0) goto error; - HDmemcpy(buf, "abcd\0abcd\0xxxxxxxxxx", (size_t)20); + memcpy(buf, "abcd\0abcd\0xxxxxxxxxx", (size_t)20); if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcd abcd ", (size_t)20) != 0) { + if (memcmp(buf, "abcd abcd ", (size_t)20) != 0) { H5_FAILED(); HDputs(" C buffer to Fortran test 3"); goto error; } if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0) goto error; - if (HDmemcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) { + if (memcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) { H5_FAILED(); HDputs(" Fortran to C buffer test 3"); goto error; @@ -5699,7 +5699,7 @@ opaque_long(void) /* Create long tag */ if (NULL == (long_tag = (char *)malloc((size_t)(16384 + 1)))) TEST_ERROR; - HDmemset(long_tag, 'a', (size_t)16384); + memset(long_tag, 'a', (size_t)16384); long_tag[16384] = '\0'; /* Set opaque type's tag */ @@ -6696,7 +6696,7 @@ test_int_float_except(void) TEST_ERROR; /* Convert buffer */ - HDmemset(&e, 0, sizeof(except_info_t)); + memset(&e, 0, sizeof(except_info_t)); if (H5Tconvert(H5T_NATIVE_FLOAT, H5T_NATIVE_INT, (size_t)CONVERT_SIZE, buf, NULL, dxpl) < 0) TEST_ERROR; @@ -6720,7 +6720,7 @@ test_int_float_except(void) TEST_ERROR; /* Convert buffer */ - HDmemset(&e, 0, sizeof(except_info_t)); + memset(&e, 0, sizeof(except_info_t)); if (H5Tconvert(H5T_NATIVE_INT, H5T_NATIVE_FLOAT, (size_t)CONVERT_SIZE, buf, NULL, dxpl) < 0) TEST_ERROR; @@ -6746,7 +6746,7 @@ test_int_float_except(void) /* Work on second buffer */ /* Convert second buffer */ - HDmemset(&e, 0, sizeof(except_info_t)); + memset(&e, 0, sizeof(except_info_t)); if (H5Tconvert(H5T_NATIVE_INT, H5T_NATIVE_FLOAT, (size_t)CONVERT_SIZE, buf2, NULL, dxpl) < 0) TEST_ERROR; @@ -6770,7 +6770,7 @@ test_int_float_except(void) TEST_ERROR; /* Convert buffer */ - HDmemset(&e, 0, sizeof(except_info_t)); + memset(&e, 0, sizeof(except_info_t)); if (H5Tconvert(H5T_NATIVE_FLOAT, H5T_NATIVE_INT, (size_t)CONVERT_SIZE, buf2, NULL, dxpl) < 0) TEST_ERROR; |