From 345892de238beebf02ca733ef519574601b5fdce Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Fri, 5 Feb 2021 16:38:27 -0600 Subject: 1 8 changes for sanitize=address (#315) * Update supported platforms * Merge PR#3 changes from develop --- c++/test/tvlstr.cpp | 2 +- hl/c++/examples/ptExampleFL.cpp | 2 +- hl/test/test_table.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp index 6154083..a757edd 100644 --- a/c++/test/tvlstr.cpp +++ b/c++/test/tvlstr.cpp @@ -176,7 +176,7 @@ test_vlstring_dataset() // Test scalar type dataset with 1 value. dset1 = root.createDataSet("test_scalar_small", vlst, ds_space); - dynstring_ds_write = (char *)HDcalloc(1, sizeof(char)); + dynstring_ds_write = (char *)HDcalloc(2, sizeof(char)); HDmemset(dynstring_ds_write, 'A', 1); // Write data to the dataset, then read it back. diff --git a/hl/c++/examples/ptExampleFL.cpp b/hl/c++/examples/ptExampleFL.cpp index 7b508b4..3e4a529 100644 --- a/hl/c++/examples/ptExampleFL.cpp +++ b/hl/c++/examples/ptExampleFL.cpp @@ -73,7 +73,7 @@ main(void) if (err < 0) fprintf(stderr, "Error getting packet count."); - printf("Number of packets in packet table after five appends: %d\n", count); + printf("Number of packets in packet table after five appends: %llu\n", count); /* Initialize packet table's "current record" */ ptable.ResetIndex(); diff --git a/hl/test/test_table.c b/hl/test/test_table.c index b462ec1..bbd4888 100644 --- a/hl/test/test_table.c +++ b/hl/test/test_table.c @@ -1274,7 +1274,7 @@ test_table(hid_t fid, int do_write) /* write the new longitude and latitude information to all the records */ nfields = 2; start = 0; - nrecords = NRECORDS; + nrecords = NRECORDS_ADD; if (H5TBwrite_fields_index(fid, "table12", nfields, field_index_pos, start, nrecords, sizeof(position_t), field_offset_pos, field_sizes_pos, position_in) < 0) goto out; -- cgit v0.12