summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-02-12 17:04:40 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-02-12 17:04:40 (GMT)
commit1074ccf4d935792506aa5acd8628f57be65d2091 (patch)
treeee5985e74f56af453d4fa66c33777f83f09566ea /test
parentbf1419ffe4a3a94c6c0750d48692fd9d9d1e3d8d (diff)
downloadhdf5-1074ccf4d935792506aa5acd8628f57be65d2091.zip
hdf5-1074ccf4d935792506aa5acd8628f57be65d2091.tar.gz
hdf5-1074ccf4d935792506aa5acd8628f57be65d2091.tar.bz2
[svn-r6398] Purpose:
Code cleanup Description: Clean up some compiler warnings Platforms tested: FreeBSD 4.7 (sleipnir)
Diffstat (limited to 'test')
-rw-r--r--test/dsets.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/test/dsets.c b/test/dsets.c
index db51344..a6398ea 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -640,8 +640,7 @@ corrupt_data(unsigned int flags, size_t cd_nelmts,
unsigned int offset;
unsigned int length;
unsigned int value;
- unsigned char *corrupt_data;
- int i;
+ void *data;
if (cd_nelmts!=3 || !cd_values)
return 0;
@@ -651,23 +650,23 @@ corrupt_data(unsigned int flags, size_t cd_nelmts,
if(offset>nbytes || (offset+length)>nbytes || length<sizeof(unsigned int))
return 0;
- corrupt_data = (unsigned char*)HDmalloc(length);
- HDmemset((void*)corrupt_data, value, length);
+ data = HDmalloc(length);
+ HDmemset(data, (int)value, length);
if (flags & H5Z_FLAG_REVERSE) { /* Varify data is actually corrupted during read */
dst += offset;
- if(HDmemcmp(corrupt_data, dst, length)!=0) return 0;
+ if(HDmemcmp(data, dst, length)!=0) return 0;
*buf_size = nbytes;
ret_value = nbytes;
} else { /* Write corrupted data */
dst += offset;
- HDmemcpy(dst, corrupt_data, length);
+ HDmemcpy(dst, data, length);
*buf_size = nbytes;
ret_value = *buf_size;
}
- if(corrupt_data)
- HDfree(corrupt_data);
+ if(data)
+ HDfree(data);
return ret_value;
}
@@ -693,6 +692,8 @@ filter_cb_cont(H5Z_filter_t filter, void* UNUSED buf, size_t UNUSED buf_size,
{
if(H5Z_FILTER_ADLER32==filter)
return H5Z_CB_CONT;
+ else
+ return H5Z_CB_FAIL;
}
@@ -716,6 +717,8 @@ filter_cb_fail(H5Z_filter_t filter, void* UNUSED buf, size_t UNUSED buf_size,
{
if(H5Z_FILTER_ADLER32==filter)
return H5Z_CB_FAIL;
+ else
+ return H5Z_CB_CONT;
}
@@ -1184,7 +1187,6 @@ test_filters(hid_t file)
if(shuffle_size!=null_size) {
H5_FAILED();
puts(" Shuffled size not the same as uncompressed size.");
-printf("shuffle_size=%ld, null_size=%ld\n", shuffle_size, null_size);
goto error;
} /* end if */