summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/dsets.c4
-rw-r--r--test/dtypes.c17
-rw-r--r--test/fillval.c9
-rw-r--r--test/h5test.c4
-rw-r--r--test/stab.c2
5 files changed, 19 insertions, 17 deletions
diff --git a/test/dsets.c b/test/dsets.c
index fd3d479..1343f22 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -366,13 +366,17 @@ test_compression(hid_t file)
const hsize_t chunk_size[2] = {2, 25};
const hssize_t hs_offset[2] = {7, 30};
const hsize_t hs_size[2] = {4, 50};
+#if !(defined(H5_HAVE_COMPRESS2) && defined(H5_HAVE_ZLIB_H) && defined(H5_HAVE_LIBZ))
const char *not_supported;
+#endif
hsize_t i, j, n;
void *tconv_buf = NULL;
+#if !(defined(H5_HAVE_COMPRESS2) && defined(H5_HAVE_ZLIB_H) && defined(H5_HAVE_LIBZ))
not_supported = " Deflate compression is not supported.\n"
" The zlib was not found when hdf5 was configured.";
+#endif
TESTING("compression (setup)");
diff --git a/test/dtypes.c b/test/dtypes.c
index d423582..13df634 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -1112,7 +1112,6 @@ test_query(void)
hid_t file=-1, tid1=-1, tid2=-1;
char filename[1024];
char compnd_type[]="Compound_type", enum_type[]="Enum_type";
- int nmembs, indx;
short enum_val;
TESTING("query functions of compound and enumeration types");
@@ -1182,24 +1181,24 @@ test_query(void)
} /* end if */
/* Query member number and member index by name, for compound type. */
- if((nmembs=H5Tget_nmembers(tid1))!=4) {
+ if(H5Tget_nmembers(tid1)!=4) {
H5_FAILED();
printf("Can't get member number\n");
goto error;
} /* end if */
- if((indx=H5Tget_member_index(tid1, "c"))!=2) {
+ if(H5Tget_member_index(tid1, "c")!=2) {
H5_FAILED();
printf("Can't get correct index number\n");
goto error;
} /* end if */
/* Query member number and member index by name, for enumeration type. */
- if((nmembs=H5Tget_nmembers(tid2))!=5) {
+ if(H5Tget_nmembers(tid2)!=5) {
H5_FAILED();
printf("Can't get member number\n");
goto error;
} /* end if */
- if((indx=H5Tget_member_index(tid2, "ORANGE"))!=3) {
+ if(H5Tget_member_index(tid2, "ORANGE")!=3) {
H5_FAILED();
printf("Can't get correct index number\n");
goto error;
@@ -1242,24 +1241,24 @@ test_query(void)
} /* end if */
/* Query member number and member index by name, for compound type */
- if((nmembs=H5Tget_nmembers(tid1))!=4) {
+ if(H5Tget_nmembers(tid1)!=4) {
H5_FAILED();
printf("Can't get member number\n");
goto error;
} /* end if */
- if((indx=H5Tget_member_index(tid1, "c"))!=2) {
+ if(H5Tget_member_index(tid1, "c")!=2) {
H5_FAILED();
printf("Can't get correct index number\n");
goto error;
} /* end if */
/* Query member number and member index by name, for enumeration type */
- if((nmembs=H5Tget_nmembers(tid2))!=5) {
+ if(H5Tget_nmembers(tid2)!=5) {
H5_FAILED();
printf("Can't get member number\n");
goto error;
} /* end if */
- if((indx=H5Tget_member_index(tid2, "ORANGE"))!=3) {
+ if(H5Tget_member_index(tid2, "ORANGE")!=3) {
H5_FAILED();
printf("Can't get correct index number\n");
goto error;
diff --git a/test/fillval.c b/test/fillval.c
index 100180f..97bb690 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -100,7 +100,6 @@ static hid_t create_compound_type(void)
static int
test_getset(void)
{
- herr_t status;
hid_t dcpl=-1;
int fill_i;
hid_t type_ss=-1, type_si=-1;
@@ -138,7 +137,7 @@ test_getset(void)
* no fill value should result in a failure.
*/
H5E_BEGIN_TRY {
- status = H5Pget_fill_value(dcpl, H5T_NATIVE_INT, &fill_i);
+ H5Pget_fill_value(dcpl, H5T_NATIVE_INT, &fill_i);
} H5E_END_TRY;
if (fill_i != 0) {
H5_FAILED();
@@ -226,7 +225,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
{
hid_t file=-1, space=-1, dcpl=-1, comp_type_id=-1;
hid_t dset1=-1, dset2=-1, dset3=-1, dset4=-1, dset5=-1,
- dset6=-1, dset7=-1, dset8=-1, dset9=-1;
+ dset6=-1, /* dset7=-1, */ dset8=-1, dset9=-1;
hsize_t cur_size[5] = {32, 16, 8, 4, 2};
hsize_t ch_size[5] = {1, 1, 1, 4, 2};
short rd_s, fill_s = 0x1234;
@@ -303,7 +302,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if(H5Pset_fill_value(dcpl, -1, NULL)<0) goto error;
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) goto error;
H5E_BEGIN_TRY {
- if((dset7 = H5Dcreate(file, "dset7", H5T_NATIVE_LONG, space, dcpl))!=FAIL)
+ if(H5Dcreate(file, "dset7", H5T_NATIVE_LONG, space, dcpl)!=FAIL)
goto error;
} H5E_END_TRY;
@@ -342,7 +341,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
* Supposed to fail. */
if(H5Pset_fill_value(dcpl, -1, NULL)<0) goto error;
H5E_BEGIN_TRY {
- if((dset7 = H5Dcreate(file, "dset7", H5T_NATIVE_LONG, space, dcpl))!=FAIL)
+ if(H5Dcreate(file, "dset7", H5T_NATIVE_LONG, space, dcpl)!=FAIL)
goto error;
} H5E_END_TRY;
diff --git a/test/h5test.c b/test/h5test.c
index 05d5147..23ecb33 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -151,7 +151,7 @@ h5_cleanup(const char *base_name[], hid_t fapl)
H5FD_mem_t mt;
assert(strlen(multi_letters)==H5FD_MEM_NTYPES);
- for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt=mt+1) {
+ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) {
HDsnprintf(temp, sizeof temp, "%s-%c.h5",
filename, multi_letters[mt]);
HDremove(temp); /*don't care if it fails*/
@@ -443,7 +443,7 @@ h5_fileaccess(void)
HDmemset(memb_addr, 0, sizeof memb_addr);
assert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES);
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=mt+1) {
+ for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) {
memb_fapl[mt] = H5P_DEFAULT;
sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
memb_name[mt] = sv[mt];
diff --git a/test/stab.c b/test/stab.c
index c2af94f..bd799c0 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -107,7 +107,7 @@ test_long(hid_t file)
/* Group names */
name1 = malloc(namesize);
for (i=0; i<namesize; i++)
- name1[i] = 'A' + i%26;
+ name1[i] = (char)('A' + i%26);
name1[namesize-1] = '\0';
name2 = malloc(2*namesize + 2);
sprintf(name2, "%s/%s", name1, name1);