summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/dangle.c12
-rw-r--r--test/dsets.c4
-rw-r--r--test/getname.c1
-rw-r--r--test/h5test.c2
-rw-r--r--test/ntypes.c165
-rw-r--r--test/set_extent.c1
-rw-r--r--test/ttsafe.c2
-rw-r--r--test/ttsafe_acreate.c4
-rw-r--r--test/ttsafe_cancel.c10
-rw-r--r--test/ttsafe_dcreate.c4
-rw-r--r--test/ttsafe_error.c4
11 files changed, 101 insertions, 108 deletions
diff --git a/test/dangle.c b/test/dangle.c
index 5f8de0c..5e6919b 100644
--- a/test/dangle.c
+++ b/test/dangle.c
@@ -54,7 +54,6 @@ static int
test_dangle_dataset(H5F_close_degree_t degree)
{
char filename[1024];
- off_t file_size; /* Size of file */
hid_t fid; /* File ID */
hid_t fapl; /* File access property list */
hid_t dsid; /* Dataset ID */
@@ -118,7 +117,7 @@ test_dangle_dataset(H5F_close_degree_t degree)
if(H5close()<0)
TEST_ERROR;
- if((file_size=h5_get_file_size(filename))==0)
+ if(h5_get_file_size(filename)==0)
TEST_ERROR;
/* Clean up temporary file */
@@ -152,7 +151,6 @@ static int
test_dangle_group(H5F_close_degree_t degree)
{
char filename[1024];
- off_t file_size; /* Size of file */
hid_t fid; /* File ID */
hid_t fapl; /* File access property list */
hid_t gid; /* Group ID */
@@ -212,7 +210,7 @@ test_dangle_group(H5F_close_degree_t degree)
if(H5close()<0)
TEST_ERROR;
- if((file_size=h5_get_file_size(filename))==0)
+ if(h5_get_file_size(filename)==0)
TEST_ERROR;
/* Clean up temporary file */
@@ -246,7 +244,6 @@ static int
test_dangle_datatype(H5F_close_degree_t degree)
{
char filename[1024];
- off_t file_size; /* Size of file */
hid_t fid; /* File ID */
hid_t fapl; /* File access property list */
hid_t tid; /* Datatype ID */
@@ -310,7 +307,7 @@ test_dangle_datatype(H5F_close_degree_t degree)
if(H5close()<0)
TEST_ERROR;
- if((file_size=h5_get_file_size(filename))==0)
+ if(h5_get_file_size(filename)==0)
TEST_ERROR;
/* Clean up temporary file */
@@ -344,7 +341,6 @@ static int
test_dangle_attribute(H5F_close_degree_t degree)
{
char filename[1024];
- off_t file_size; /* Size of file */
hid_t fid; /* File ID */
hid_t fapl; /* File access property list */
hid_t dsid; /* Dataset ID */
@@ -419,7 +415,7 @@ test_dangle_attribute(H5F_close_degree_t degree)
if(H5close()<0)
TEST_ERROR;
- if((file_size=h5_get_file_size(filename))==0)
+ if(h5_get_file_size(filename)==0)
TEST_ERROR;
/* Clean up temporary file */
diff --git a/test/dsets.c b/test/dsets.c
index 868ede7..12883b9 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -1048,7 +1048,7 @@ set_local_bogus2(hid_t dcpl_id, hid_t type_id, hid_t UNUSED space_id)
/* Check for native integer datatype and set private property */
if(H5Tequal(type_id,H5T_NATIVE_INT)>0)
- add_on=H5Tget_size(type_id);
+ add_on=(unsigned)H5Tget_size(type_id);
/* Get the filter's current parameters */
if(H5Pget_filter_by_id(dcpl_id,H5Z_FILTER_BOGUS2,&flags,&cd_nelmts,
@@ -2685,8 +2685,8 @@ file)
#ifdef H5_HAVE_FILTER_SZIP
error:
-#endif /* H5_HAVE_FILTER_SZIP */
return -1;
+#endif /* H5_HAVE_FILTER_SZIP */
} /* end test_can_apply_szip() */
#ifndef H5_WANT_H5_V1_4_COMPAT
diff --git a/test/getname.c b/test/getname.c
index d049419..69f741c 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -2869,6 +2869,7 @@ int main( void )
/* Close file */
H5Fclose( file_id );
+ puts("All getname tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
diff --git a/test/h5test.c b/test/h5test.c
index 1326208..ccee874 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -269,7 +269,9 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
const char *suffix = ".h5"; /* suffix has default */
char *ptr, last = '\0';
size_t i, j;
+#ifdef H5_HAVE_PARALLEL
static int HDF5_PARAPREFIX_explained=0;
+#endif /* H5_HAVE_PARALLEL */
hid_t driver=(-1);
if (!base_name || !fullname || size < 1)
diff --git a/test/ntypes.c b/test/ntypes.c
index a6d0378..bd87f12 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -26,9 +26,12 @@ const char *FILENAME[] = {
NULL
};
-int ipoints2[100][200], icheck2[100][200];
-short spoints2[100][200], scheck2[100][200];
-int ipoints3[100][200][5], icheck3[100][200][5];
+#define DIM0 100
+#define DIM1 200
+
+int ipoints2[DIM0][DIM1], icheck2[DIM0][DIM1];
+short spoints2[DIM0][DIM1], scheck2[DIM0][DIM1];
+int ipoints3[DIM0][DIM1][5], icheck3[DIM0][DIM1][5];
#define DSET_ATOMIC_NAME_1 "atomic_type_1"
#define DSET_ATOMIC_NAME_2 "atomic_type_2"
@@ -82,15 +85,15 @@ test_atomic_dtype(hid_t file)
TESTING("atomic datatype");
/* Initialize the dataset */
- for (i = n = 0; i < 100; i++) {
- for (j = 0; j < 200; j++) {
+ for (i = n = 0; i < DIM0; i++) {
+ for (j = 0; j < DIM1; j++) {
ipoints2[i][j] = n++;
}
}
/* Create the data space */
- dims[0] = 100;
- dims[1] = 200;
+ dims[0] = DIM0;
+ dims[1] = DIM1;
if ((space = H5Screate_simple(2, dims, NULL))<0) TEST_ERROR;
/*------------------- Test data values ------------------------*/
@@ -123,22 +126,22 @@ test_atomic_dtype(hid_t file)
/* Read the dataset back. The temporary buffer is for special platforms
* like Cray. */
- tmp = malloc(dims[0]*dims[1]*H5Tget_size(native_type));
+ tmp = malloc((size_t)(DIM0*DIM1*H5Tget_size(native_type)));
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp)<0)
TEST_ERROR;
/* Copy data from temporary buffer to destination buffer */
- memcpy(icheck2, tmp, dims[0]*dims[1]*H5Tget_size(native_type));
+ memcpy(icheck2, tmp, (size_t)(DIM0*DIM1*H5Tget_size(native_type)));
free(tmp);
/* Convert to the integer type */
- if(H5Tconvert(native_type, H5T_NATIVE_INT, dims[0]*dims[1], icheck2, NULL, H5P_DEFAULT)<0)
+ if(H5Tconvert(native_type, H5T_NATIVE_INT, (hsize_t)(DIM0*DIM1), icheck2, NULL, H5P_DEFAULT)<0)
TEST_ERROR;
/* Check that the values read are the same as the values written */
- for (i = 0; i < dims[0]; i++) {
- for (j = 0; j < dims[1]; j++) {
+ for (i = 0; i < DIM0; i++) {
+ for (j = 0; j < DIM1; j++) {
if (ipoints2[i][j] != icheck2[i][j]) {
H5_FAILED();
printf(" Read different values than written.\n");
@@ -289,14 +292,14 @@ test_compound_dtype2(hid_t file)
TESTING("nested compound datatype");
/* Allocate space for the points & check arrays */
- if((points=malloc(sizeof(s1)*100*200))==NULL)
+ if((points=malloc(sizeof(s1)*DIM0*DIM1))==NULL)
TEST_ERROR;
- if((check=calloc(sizeof(s1),100*200))==NULL)
+ if((check=calloc(sizeof(s1),DIM0*DIM1))==NULL)
TEST_ERROR;
/* Initialize the dataset */
- for (i = n = 0, temp_point=points; i < 100; i++) {
- for (j = 0; j < 200; j++,temp_point++) {
+ for (i = n = 0, temp_point=points; i < DIM0; i++) {
+ for (j = 0; j < DIM1; j++,temp_point++) {
temp_point->c = 't';
temp_point->i = n++;
temp_point->st.c2 = i+j;
@@ -306,8 +309,8 @@ test_compound_dtype2(hid_t file)
}
/* Create the data space */
- dims[0] = 100;
- dims[1] = 200;
+ dims[0] = DIM0;
+ dims[1] = DIM1;
if ((space = H5Screate_simple(2, dims, NULL))<0) TEST_ERROR;
/* Create compound datatype for disk storage */
@@ -442,24 +445,24 @@ test_compound_dtype2(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
- tmp = malloc(dims[0]*dims[1]*H5Tget_size(native_type));
- if((bkg=calloc(sizeof(s1),dims[0]*dims[1]))==NULL)
+ tmp = malloc(DIM0*DIM1*H5Tget_size(native_type));
+ if((bkg=calloc(sizeof(s1),DIM0*DIM1))==NULL)
TEST_ERROR;
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp)<0)
TEST_ERROR;
- memcpy(check, tmp, dims[0]*dims[1]*H5Tget_size(native_type));
+ memcpy(check, tmp, DIM0*DIM1*H5Tget_size(native_type));
free(tmp);
- if (H5Tconvert(native_type, tid_m, dims[0]*dims[1], check, bkg, H5P_DEFAULT))
+ if (H5Tconvert(native_type, tid_m, (hsize_t)(DIM0*DIM1), check, bkg, H5P_DEFAULT))
TEST_ERROR;
free(bkg);
/* Check that the values read are the same as the values written */
- for (i = 0, temp_point=points, temp_check=check; i < 100; i++) {
- for (j = 0; j < 200; j++, temp_point++,temp_check++) {
+ for (i = 0, temp_point=points, temp_check=check; i < DIM0; i++) {
+ for (j = 0; j < DIM1; j++, temp_point++,temp_check++) {
if (temp_point->c != temp_check->c ||
temp_point->i != temp_check->i ||
temp_point->st.c2 != temp_check->st.c2 ||
@@ -536,14 +539,14 @@ test_compound_dtype(hid_t file)
/* Allocate space for the points & check arrays */
- if((points=malloc(sizeof(s1)*100*200))==NULL)
+ if((points=malloc(sizeof(s1)*DIM0*DIM1))==NULL)
TEST_ERROR;
- if((check=calloc(sizeof(s1),100*200))==NULL)
+ if((check=calloc(sizeof(s1),DIM0*DIM1))==NULL)
TEST_ERROR;
/* Initialize the dataset */
- for (i = n = 0, temp_point=points; i < 100; i++) {
- for (j = 0; j < 200; j++,temp_point++) {
+ for (i = n = 0, temp_point=points; i < DIM0; i++) {
+ for (j = 0; j < DIM1; j++,temp_point++) {
temp_point->c = 't';
temp_point->i = n++;
temp_point->l = (i*10+j*100)*n;
@@ -551,8 +554,8 @@ test_compound_dtype(hid_t file)
}
/* Create the data space */
- dims[0] = 100;
- dims[1] = 200;
+ dims[0] = DIM0;
+ dims[1] = DIM1;
if ((space = H5Screate_simple(2, dims, NULL))<0) TEST_ERROR;
/* Create compound datatype for disk storage */
@@ -625,23 +628,23 @@ test_compound_dtype(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
- tmp = malloc(dims[0]*dims[1]*H5Tget_size(native_type));
- bkg = calloc(sizeof(s1),dims[0]*dims[1]);
+ tmp = malloc(DIM0*DIM1*H5Tget_size(native_type));
+ bkg = calloc(sizeof(s1),DIM0*DIM1);
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp)<0)
TEST_ERROR;
- memcpy(check, tmp, dims[0]*dims[1]*H5Tget_size(native_type));
+ memcpy(check, tmp, DIM0*DIM1*H5Tget_size(native_type));
free(tmp);
- if (H5Tconvert(native_type, tid2, dims[0]*dims[1], check, bkg, H5P_DEFAULT)<0)
+ if (H5Tconvert(native_type, tid2, (hsize_t)(DIM0*DIM1), check, bkg, H5P_DEFAULT)<0)
TEST_ERROR;
free(bkg);
/* Check that the values read are the same as the values written */
- for (i = 0, temp_point=points, temp_check=check; i < 100; i++) {
- for (j = 0; j < 200; j++, temp_point++,temp_check++) {
+ for (i = 0, temp_point=points, temp_check=check; i < DIM0; i++) {
+ for (j = 0; j < DIM1; j++, temp_point++,temp_check++) {
if (temp_point->c != temp_check->c ||
temp_point->i != temp_check->i ||
temp_point->l != temp_check->l ) {
@@ -710,14 +713,14 @@ test_compound_dtype3(hid_t file)
TESTING("compound datatype with array as field");
/* Allocate space for the points & check arrays */
- if((points=malloc(sizeof(s1)*100*200))==NULL)
+ if((points=malloc(sizeof(s1)*DIM0*DIM1))==NULL)
TEST_ERROR;
- if((check=calloc(sizeof(s1),100*200))==NULL)
+ if((check=calloc(sizeof(s1),DIM0*DIM1))==NULL)
TEST_ERROR;
/* Initialize the dataset */
- for (i = n = 0, temp_point=points; i < 100; i++) {
- for (j = 0; j < 200; j++,temp_point++) {
+ for (i = n = 0, temp_point=points; i < DIM0; i++) {
+ for (j = 0; j < DIM1; j++,temp_point++) {
temp_point->c = 't';
temp_point->l = (i*10+j*100)*n;
for (k = 0; k < 5; k++)
@@ -726,8 +729,8 @@ test_compound_dtype3(hid_t file)
}
/* Create the data space */
- dims[0] = 100;
- dims[1] = 200;
+ dims[0] = DIM0;
+ dims[1] = DIM1;
if ((space = H5Screate_simple(2, dims, NULL))<0) TEST_ERROR;
/* Create array datatype */
@@ -818,24 +821,24 @@ test_compound_dtype3(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
- tmp = malloc(dims[0]*dims[1]*H5Tget_size(native_type));
- if((bkg=calloc(sizeof(s1),dims[0]*dims[1]))==NULL)
+ tmp = malloc(DIM0*DIM1*H5Tget_size(native_type));
+ if((bkg=calloc(sizeof(s1),DIM0*DIM1))==NULL)
TEST_ERROR;
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp)<0)
TEST_ERROR;
- memcpy(check, tmp, dims[0]*dims[1]*H5Tget_size(native_type));
+ memcpy(check, tmp, DIM0*DIM1*H5Tget_size(native_type));
free(tmp);
- if (H5Tconvert(native_type, tid_m, dims[0]*dims[1], check, bkg, H5P_DEFAULT))
+ if (H5Tconvert(native_type, tid_m, (hsize_t)(DIM0*DIM1), check, bkg, H5P_DEFAULT))
TEST_ERROR;
free(bkg);
/* Check that the values read are the same as the values written */
- for (i = 0, temp_point=points, temp_check=check; i < 100; i++) {
- for (j = 0; j < 200; j++, temp_point++,temp_check++) {
+ for (i = 0, temp_point=points, temp_check=check; i < DIM0; i++) {
+ for (j = 0; j < DIM1; j++, temp_point++,temp_check++) {
if (temp_point->c != temp_check->c ||
temp_point->l != temp_check->l ) {
H5_FAILED();
@@ -911,14 +914,14 @@ test_enum_dtype(hid_t file)
TESTING("enum datatype");
/* Initialize the dataset */
- for (i = 0; i < 100; i++) {
- for (j=0, n=0; j < 200; j++, n++)
+ for (i = 0; i < DIM0; i++) {
+ for (j=0, n=0; j < DIM1; j++, n++)
spoints2[i][j] = (i*10+j*100+n)%8;
}
/* Create the data space */
- dims[0] = 100;
- dims[1] = 200;
+ dims[0] = DIM0;
+ dims[1] = DIM1;
if ((space = H5Screate_simple(2, dims, NULL))<0) TEST_ERROR;
/* Construct enum type based on native type */
@@ -965,20 +968,20 @@ test_enum_dtype(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
- tmp = malloc(dims[0]*dims[1]*H5Tget_size(native_type));
+ tmp = malloc(DIM0*DIM1*H5Tget_size(native_type));
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp)<0)
TEST_ERROR;
- memcpy(scheck2, tmp, dims[0]*dims[1]*H5Tget_size(native_type));
+ memcpy(scheck2, tmp, DIM0*DIM1*H5Tget_size(native_type));
free(tmp);
- if (H5Tconvert(native_type, tid_m, dims[0]*dims[1], scheck2, NULL, H5P_DEFAULT)<0)
+ if (H5Tconvert(native_type, tid_m, (hsize_t)(DIM0*DIM1), scheck2, NULL, H5P_DEFAULT)<0)
TEST_ERROR;
/* Check that the values read are the same as the values written */
- for (i = 0; i < 100; i++) {
- for (j = 0; j < 200; j++) {
+ for (i = 0; i < DIM0; i++) {
+ for (j = 0; j < DIM1; j++) {
if (spoints2[i][j] != scheck2[i][j]) {
H5_FAILED();
printf(" Read different values than written.\n");
@@ -1037,14 +1040,14 @@ test_array_dtype(hid_t file)
TESTING("array of compound datatype");
/* Allocate space for the points & check arrays */
- if((points=malloc(sizeof(s1)*100*200*5))==NULL)
+ if((points=malloc(sizeof(s1)*DIM0*DIM1*5))==NULL)
TEST_ERROR;
- if((check=calloc(sizeof(s1),100*200*5))==NULL)
+ if((check=calloc(sizeof(s1),DIM0*DIM1*5))==NULL)
TEST_ERROR;
/* Initialize the dataset */
- for(i = n = 0, temp_point=points; i < 100; i++)
- for(j = 0; j < 200; j++)
+ for(i = n = 0, temp_point=points; i < DIM0; i++)
+ for(j = 0; j < DIM1; j++)
for(k = 0; k < 5; k++,temp_point++) {
temp_point->c= 't';
temp_point->i= n++;
@@ -1052,8 +1055,8 @@ test_array_dtype(hid_t file)
}
/* Create the data space */
- space_dims[0] = 100;
- space_dims[1] = 200;
+ space_dims[0] = DIM0;
+ space_dims[1] = DIM1;
if ((space = H5Screate_simple(2, space_dims, NULL))<0) TEST_ERROR;
/* Create compound datatype for disk storage */
@@ -1104,21 +1107,20 @@ test_array_dtype(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
- tmp = malloc(space_dims[0]*space_dims[1]*H5Tget_size(native_type));
+ tmp = malloc(DIM0*DIM1*H5Tget_size(native_type));
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp)<0)
TEST_ERROR;
- memcpy(check, tmp, space_dims[0]*space_dims[1]*H5Tget_size(native_type));
+ memcpy(check, tmp, DIM0*DIM1*H5Tget_size(native_type));
free(tmp);
- if (H5Tconvert(native_type, tid_m, space_dims[0]*space_dims[1], check,
- NULL, H5P_DEFAULT)<0)
+ if (H5Tconvert(native_type, tid_m, (hsize_t)(DIM0*DIM1), check, NULL, H5P_DEFAULT)<0)
TEST_ERROR;
/* Check that the values read are the same as the values written */
- for (i = 0, temp_point=points, temp_check=check; i < 100; i++) {
- for (j = 0; j < 200; j++) {
+ for (i = 0, temp_point=points, temp_check=check; i < DIM0; i++) {
+ for (j = 0; j < DIM1; j++) {
for (k = 0; k < 5; k++, temp_point++,temp_check++) {
if (temp_point->c != temp_check->c ||
temp_point->i != temp_check->i ||
@@ -1183,14 +1185,14 @@ test_array_dtype2(hid_t file)
TESTING("array of atomic datatype");
/* Initialize the dataset */
- for(i = n = 0;i < 100; i++)
- for(j = 0; j < 200; j++)
+ for(i = n = 0;i < DIM0; i++)
+ for(j = 0; j < DIM1; j++)
for(k = 0; k < 5; k++)
ipoints3[i][j][k] = n++;
/* Create the data space */
- space_dims[0] = 100;
- space_dims[1] = 200;
+ space_dims[0] = DIM0;
+ space_dims[1] = DIM1;
if ((space = H5Screate_simple(2, space_dims, NULL))<0) TEST_ERROR;
/* Create array datatype for disk storage */
@@ -1227,21 +1229,20 @@ test_array_dtype2(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
- tmp = malloc(space_dims[0]*space_dims[1]*H5Tget_size(native_type));
+ tmp = malloc(DIM0*DIM1*H5Tget_size(native_type));
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp)<0)
TEST_ERROR;
- memcpy(icheck3, tmp, space_dims[0]*space_dims[1]*H5Tget_size(native_type));
+ memcpy(icheck3, tmp, DIM0*DIM1*H5Tget_size(native_type));
free(tmp);
- if (H5Tconvert(native_type, tid_m, space_dims[0]*space_dims[1], icheck3, NULL,
- H5P_DEFAULT)<0)
+ if (H5Tconvert(native_type, tid_m, (hsize_t)(DIM0*DIM1), icheck3, NULL, H5P_DEFAULT)<0)
TEST_ERROR;
/* Check that the values read are the same as the values written */
- for (i = 0; i < 100; i++) {
- for (j = 0; j < 200; j++) {
+ for (i = 0; i < DIM0; i++) {
+ for (j = 0; j < DIM1; j++) {
for (k = 0; k < 5; k++) {
if(icheck3[i][j][k] != ipoints3[i][j][k]) {
H5_FAILED();
@@ -1386,14 +1387,14 @@ test_vl_dtype(hid_t file)
tmp=malloc(t2->len*sizeof(unsigned int));
memcpy(tmp, t2->p, t2->len*H5Tget_size(nat_super_type));
- if (H5Tconvert(nat_super_type, H5T_NATIVE_UINT, t2->len, tmp, NULL, H5P_DEFAULT))
+ if (H5Tconvert(nat_super_type, H5T_NATIVE_UINT, (hsize_t)t2->len, tmp, NULL, H5P_DEFAULT))
TEST_ERROR;
for(k=0; k<t2->len; k++) {
if( ((unsigned int *)t1->p)[k] != ((unsigned int *)tmp)[k] ) {
H5_FAILED();
- printf(" VL data don't match!, wdata[%d].p=%d, rdata[%d].p=%d\n",
- i,((unsigned int*)t1->p)[k],i,(unsigned int*)tmp[k]);
+ printf(" VL data don't match!, wdata[%u].p=%d, rdata[%u].p=%u\n",
+ (unsigned)i,((unsigned int*)t1->p)[k],(unsigned)i,((unsigned int*)tmp)[k]);
goto error;
}
} /* end for */
diff --git a/test/set_extent.c b/test/set_extent.c
index 0c77123..90d1654 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -469,6 +469,7 @@ int main( void )
PASSED();
+ puts("All set_extent tests passed.");
return 0;
diff --git a/test/ttsafe.c b/test/ttsafe.c
index 354f788..94e1209 100644
--- a/test/ttsafe.c
+++ b/test/ttsafe.c
@@ -315,7 +315,7 @@ int main(int argc, char *argv[])
if (num_errs)
print_func("!!! %d Error(s) were detected !!!\n\n", (int) num_errs);
else
- print_func("All tests were successful. \n\n");
+ print_func("All threadsafe tests were successful. \n\n");
if (Summary) {
print_func("Summary of Test Results:\n");
diff --git a/test/ttsafe_acreate.c b/test/ttsafe_acreate.c
index 4070861..ac981b0 100644
--- a/test/ttsafe_acreate.c
+++ b/test/ttsafe_acreate.c
@@ -47,9 +47,7 @@
#include "ttsafe.h"
-#ifndef H5_HAVE_THREADSAFE
-static int dummy; /* just to create a non-empty object file */
-#else
+#ifdef H5_HAVE_THREADSAFE
#include <stdio.h>
#include <stdlib.h>
diff --git a/test/ttsafe_cancel.c b/test/ttsafe_cancel.c
index 808e1c8..4247f07 100644
--- a/test/ttsafe_cancel.c
+++ b/test/ttsafe_cancel.c
@@ -45,9 +45,7 @@
********************************************************************/
#include "ttsafe.h"
-#ifndef H5_HAVE_THREADSAFE
-static int dummy; /* just to create a non-empty object file */
-#else
+#ifdef H5_HAVE_THREADSAFE
#define FILENAME "ttsafe_cancel.h5"
#define DATASETNAME "commonname"
@@ -107,7 +105,7 @@ void tts_cancel(void)
pthread_attr_destroy(&attribute);
}
-void *tts_cancel_thread(void *arg)
+void *tts_cancel_thread(void UNUSED *arg)
{
int datavalue;
int *buffer;
@@ -161,8 +159,8 @@ void *tts_cancel_thread(void *arg)
return NULL;
}
-herr_t tts_cancel_callback(void *elem, hid_t type_id, hsize_t ndim,
- hssize_t *point, void *operator_data)
+herr_t tts_cancel_callback(void *elem, hid_t UNUSED type_id, hsize_t UNUSED ndim,
+ hssize_t UNUSED *point, void *operator_data)
{
int value = *(int *)elem;
hid_t dataset = *(hid_t *)operator_data;
diff --git a/test/ttsafe_dcreate.c b/test/ttsafe_dcreate.c
index c57e944..b351994 100644
--- a/test/ttsafe_dcreate.c
+++ b/test/ttsafe_dcreate.c
@@ -41,9 +41,7 @@
********************************************************************/
#include "ttsafe.h"
-#ifndef H5_HAVE_THREADSAFE
-static int dummy; /* just to create a non-empty object file */
-#else
+#ifdef H5_HAVE_THREADSAFE
#define FILENAME "ttsafe_dcreate.h5"
#define DATASETNAME_LENGTH 10
diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c
index 2e60ca1..ba1a394 100644
--- a/test/ttsafe_error.c
+++ b/test/ttsafe_error.c
@@ -45,9 +45,7 @@
********************************************************************/
#include "ttsafe.h"
-#ifndef H5_HAVE_THREADSAFE
-static int dummy; /* just to create a non-empty object file */
-#else
+#ifdef H5_HAVE_THREADSAFE
#define NUM_THREAD 16
#define FILENAME "ttsafe_error.h5"