summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dumpgentest.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-07-27 17:50:58 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-07-27 17:50:58 (GMT)
commit3333acc05a6b3be7ed93c1291b7d4c69ed262f72 (patch)
tree7e618cad0faa94057b00a9a6d5b54d2d8e0dfe25 /tools/h5dump/h5dumpgentest.c
parent3a6b7da5f338388d83036ec7f9c3d64c01ff8ed1 (diff)
downloadhdf5-3333acc05a6b3be7ed93c1291b7d4c69ed262f72.zip
hdf5-3333acc05a6b3be7ed93c1291b7d4c69ed262f72.tar.gz
hdf5-3333acc05a6b3be7ed93c1291b7d4c69ed262f72.tar.bz2
Merge of HDFFV-10845, 10529 from develop
Diffstat (limited to 'tools/h5dump/h5dumpgentest.c')
-rw-r--r--tools/h5dump/h5dumpgentest.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index be6361e..8d85466 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -20,7 +20,6 @@
* trying it on a new platform, ...), you need to verify the correctness
* of the expected output and update the corresponding *.ddl files.
*/
-#include <limits.h>
#include "hdf5.h"
#include "H5private.h"
@@ -1869,7 +1868,7 @@ static void gent_str2(void)
int i;
- char buf[LENSTR+10];
+ char buf[LENSTR+20];
char buf2[3*LENSTR2];
hsize_t sdim;
@@ -1921,7 +1920,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of", i);
+ sprintf(buf, "This is row %d of type H5T_STR_NULLTERM of", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -1934,7 +1933,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of string array", i);
+ sprintf(buf, "This is row %d of type H5T_STR_NULLTERM of string array", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -1954,7 +1953,7 @@ static void gent_str2(void)
for(i = 0;(hsize_t) i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of", i);
+ sprintf(buf, "This is row %d of type H5T_STR_NULLPAD of", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -1968,7 +1967,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of string array", i);
+ sprintf(buf, "This is row %d of type H5T_STR_NULLPAD of string array", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -1987,7 +1986,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of", i);
+ sprintf(buf, "This is row %d of type H5T_STR_SPACEPAD of", i);
H5Tset_size(memtype, HDstrlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -2001,7 +2000,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of string array", i);
+ sprintf(buf, "This is row %d of type H5T_STR_SPACEPAD of string array", i);
H5Tset_size(memtype, HDstrlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);