summaryrefslogtreecommitdiffstats
path: root/c++/test/tattr.cpp
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-03-06 23:33:00 (GMT)
committerGitHub <noreply@github.com>2022-03-06 23:33:00 (GMT)
commit78375882485a99a81caa933928ed08d7a38ef88b (patch)
treef18c41d7794d546b6562dd2aa36932c78f00a16a /c++/test/tattr.cpp
parent7e176db164d1a6f944e703c612c4952b15d333f4 (diff)
downloadhdf5-78375882485a99a81caa933928ed08d7a38ef88b.zip
hdf5-78375882485a99a81caa933928ed08d7a38ef88b.tar.gz
hdf5-78375882485a99a81caa933928ed08d7a38ef88b.tar.bz2
VFD SWMR: normalization with develop (#1472)
Much normalization with develop. Still needs tools changes wrt VFD plugins.
Diffstat (limited to 'c++/test/tattr.cpp')
-rw-r--r--c++/test/tattr.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index 26699d2..dc968f9 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -95,7 +95,7 @@ struct attr4_struct {
const H5std_string ATTR5_NAME("Attr5");
const int ATTR5_RANK = 0;
-float attr_data5 = -5.123f; // Test data for 5th attribute
+float attr_data5 = -5.123F; // Test data for 5th attribute
/* Info for another attribute */
const H5std_string ATTR1A_NAME("Attr1_a");
@@ -1782,7 +1782,7 @@ test_attr_dense_create(FileCreatPropList &fcpl, FileAccPropList &fapl)
unsigned attr_num;
for (attr_num = 0; attr_num < max_compact; attr_num++) {
// Create attribute
- sprintf(attr_name, "attr %02u", attr_num);
+ snprintf(attr_name, sizeof(attr_name), "attr %02u", attr_num);
Attribute attr = dataset.createAttribute(attr_name, PredType::NATIVE_UINT, ds_space);
// Write data to the attribute
@@ -1794,7 +1794,7 @@ test_attr_dense_create(FileCreatPropList &fcpl, FileAccPropList &fapl)
{ // Add one more attribute, to push into "dense" storage
// Create another attribute
- sprintf(attr_name, "attr %02u", attr_num);
+ snprintf(attr_name, sizeof(attr_name), "attr %02u", attr_num);
Attribute attr = dataset.createAttribute(attr_name, PredType::NATIVE_UINT, ds_space);
// Write data to the attribute
@@ -1804,7 +1804,7 @@ test_attr_dense_create(FileCreatPropList &fcpl, FileAccPropList &fapl)
// Attempt to add attribute again, which should fail
try {
// Create another attribute
- sprintf(attr_name, "attr %02u", attr_num);
+ snprintf(attr_name, sizeof(attr_name), "attr %02u", attr_num);
Attribute attr = dataset.createAttribute(attr_name, PredType::NATIVE_UINT, ds_space);
// continuation here, that means no exception has been thrown