diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-10-23 20:40:14 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-10-23 20:40:14 (GMT) |
commit | e40557304fcfc662bb1a445abca516ee4b246d94 (patch) | |
tree | c9f1692443a62e0c481c7c0278e39d7b83d1b419 /test/tattr.c | |
parent | 1062b4f9d7080a3e439df7d3d527aee43f96d085 (diff) | |
download | hdf5-e40557304fcfc662bb1a445abca516ee4b246d94.zip hdf5-e40557304fcfc662bb1a445abca516ee4b246d94.tar.gz hdf5-e40557304fcfc662bb1a445abca516ee4b246d94.tar.bz2 |
[svn-r12803] Description:
Finish new version of the I/O pipeline message, which is much smaller than
the previous version. This version is used with the "use the latest version
of the format" flag.
Closed several memory leaks/overruns (found with valgrind).
Also, lots of compiler & formatting cleanups.
Tested on:
Linux/32 2.6 (chicago)
Linux/64 2.6 (chicago2)
Diffstat (limited to 'test/tattr.c')
-rw-r--r-- | test/tattr.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/tattr.c b/test/tattr.c index ed60126..969734b 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -189,7 +189,7 @@ test_attr_basic_write(hid_t fapl) CHECK(attr, FAIL, "H5Aopen_name"); /* Verify new attribute name */ - attr_name_size = H5Aget_name(attr, 0, NULL); + attr_name_size = H5Aget_name(attr, (size_t)0, NULL); CHECK(attr_name_size, FAIL, "H5Aget_name"); if(attr_name_size>0) @@ -222,7 +222,7 @@ test_attr_basic_write(hid_t fapl) CHECK(attr, FAIL, "H5Aopen_name"); /* Verify new attribute name */ - attr_name_size = H5Aget_name(attr2, 0, NULL); + attr_name_size = H5Aget_name(attr2, (size_t)0, NULL); CHECK(attr_name_size, FAIL, "H5Aget_name"); if(attr_name_size>0) @@ -784,7 +784,7 @@ test_attr_compound_read(hid_t fapl) } /* end if */ /* Verify Name */ - name_len=H5Aget_name(attr,ATTR_NAME_LEN, attr_name); + name_len=H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name); VERIFY(name_len, HDstrlen(ATTR4_NAME), "H5Aget_name"); if(HDstrcmp(attr_name,ATTR4_NAME)) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n",attr_name,ATTR4_NAME); @@ -1131,7 +1131,7 @@ test_attr_mult_read(hid_t fapl) TestErrPrintf("%d: attribute data different: attr_data1[%d]=%d, read_data1[%d]=%d\n",__LINE__,i,attr_data1[i],i,read_data1[i]); /* Verify Name */ - name_len=H5Aget_name(attr, ATTR_NAME_LEN, attr_name); + name_len=H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name); VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name"); if(HDstrcmp(attr_name,ATTR1_NAME)) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n",attr_name,ATTR1_NAME); @@ -1187,13 +1187,13 @@ test_attr_mult_read(hid_t fapl) TestErrPrintf("%d: attribute data different: attr_data2[%d][%d]=%d, read_data2[%d][%d]=%d\n",__LINE__,i,j,attr_data2[i][j],i,j,read_data2[i][j]); /* Verify Name */ - name_len=H5Aget_name(attr,ATTR_NAME_LEN, attr_name); + name_len=H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name); VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name"); if(HDstrcmp(attr_name,ATTR2_NAME)) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n",attr_name,ATTR2_NAME); /* Verify Name with too small of a buffer */ - name_len=H5Aget_name(attr,HDstrlen(ATTR2_NAME), attr_name); + name_len=H5Aget_name(attr, HDstrlen(ATTR2_NAME), attr_name); VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name"); HDstrcpy(temp_name,ATTR2_NAME); /* make a copy of the name */ temp_name[HDstrlen(ATTR2_NAME)-1]='\0'; /* truncate it to match the one retrieved */ @@ -1246,13 +1246,13 @@ test_attr_mult_read(hid_t fapl) TestErrPrintf("%d: attribute data different: attr_data3[%d][%d][%d]=%f, read_data3[%d][%d][%d]=%f\n",__LINE__,i,j,k,attr_data3[i][j][k],i,j,k,read_data3[i][j][k]); /* Verify Name */ - name_len=H5Aget_name(attr,ATTR_NAME_LEN, attr_name); + name_len=H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name); VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name"); if(HDstrcmp(attr_name,ATTR3_NAME)) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n",attr_name,ATTR3_NAME); /* Verify Name with too small of a buffer */ - name_len=H5Aget_name(attr,HDstrlen(ATTR3_NAME), attr_name); + name_len=H5Aget_name(attr, HDstrlen(ATTR3_NAME), attr_name); VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name"); HDstrcpy(temp_name,ATTR3_NAME); /* make a copy of the name */ temp_name[HDstrlen(ATTR3_NAME)-1]='\0'; /* truncate it to match the one retrieved */ @@ -1431,7 +1431,7 @@ test_attr_delete(hid_t fapl) CHECK(attr, FAIL, "H5Aopen_idx"); /* Verify Name */ - name_len=H5Aget_name(attr,ATTR_NAME_LEN,attr_name); + name_len=H5Aget_name(attr, (size_t)ATTR_NAME_LEN,attr_name); VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name"); if(HDstrcmp(attr_name,ATTR1_NAME)) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n",attr_name,ATTR1_NAME); @@ -1445,7 +1445,7 @@ test_attr_delete(hid_t fapl) CHECK(attr, FAIL, "H5Aopen_idx"); /* Verify Name */ - name_len=H5Aget_name(attr,ATTR_NAME_LEN, attr_name); + name_len=H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name); VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name"); if(HDstrcmp(attr_name,ATTR3_NAME)) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n",attr_name,ATTR3_NAME); @@ -1467,7 +1467,7 @@ test_attr_delete(hid_t fapl) CHECK(attr, FAIL, "H5Aopen_idx"); /* Verify Name */ - name_len=H5Aget_name(attr,ATTR_NAME_LEN, attr_name); + name_len=H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name); VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name"); if(HDstrcmp(attr_name,ATTR3_NAME)) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n",attr_name,ATTR3_NAME); |