diff options
-rw-r--r-- | test/istore.c | 25 | ||||
-rw-r--r-- | test/ntypes.c | 6 | ||||
-rw-r--r-- | test/vfd.c | 4 | ||||
-rw-r--r-- | tools/src/h5ls/h5ls.c | 5 |
4 files changed, 5 insertions, 35 deletions
diff --git a/test/istore.c b/test/istore.c index c75b8bf..ef34492 100644 --- a/test/istore.c +++ b/test/istore.c @@ -330,25 +330,6 @@ test_extend(hid_t f, const char *prefix, size_t nx, size_t ny, size_t nz) } } -#if 0 - if (0 == ctr) - HDfprintf(stderr,"\n"); - HDfprintf(stderr," Insert: ctr=%lu, corner=(%ld", (unsigned long)ctr, (long)offset[0]); - if (ndims > 1) - HDfprintf(stderr,",%ld", (long)offset[1]); - if (ndims > 2) - HDfprintf(stderr,",%ld", (long)offset[2]); - HDfprintf(stderr,"), size=(%lu", (unsigned long)size[0]); - if (ndims > 1) - HDfprintf(stderr,",%lu", (unsigned long)size[1]); - if (ndims > 2) - HDfprintf(stderr,",%lu", (unsigned long)size[2]); - HDfprintf(stderr,"), %lu element%s", (unsigned long)nelmts, 1 == nelmts ? "" : "s"); - if (0 == nelmts) - HDfprintf(stderr," *SKIPPED*"); - HDfprintf(stderr,"\n"); -#endif - /* Fill the source array */ if (0 == nelmts) continue; @@ -478,7 +459,7 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, size_t nx, size_t ny, s hsize_t ctr; char dims[64], s[256], name[256]; hsize_t offset[3]; - hsize_t size[3], total = 0; + hsize_t size[3]; uint8_t *buf = NULL; hsize_t whole_size[3]; /* Size of dataset's dataspace */ size_t u; /* Local index variable */ @@ -559,10 +540,6 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks, size_t nx, size_t ny, s HDprintf(")\n"); goto error; } - total += nx * ny * nz; -#if 0 - HDfprintf(stderr,"ctr: ctr=%Zu, total=%Zu\n", ctr, total); -#endif /* We don't test reading yet.... */ } diff --git a/test/ntypes.c b/test/ntypes.c index 3518e68..e79f974 100644 --- a/test/ntypes.c +++ b/test/ntypes.c @@ -2957,8 +2957,7 @@ test_ninteger(void) hid_t nid1 = -1; /* native datatype */ hid_t nid2 = -1; /* native datatype */ hsize_t dims[1] = {DIM3}; /* dataspace dimensions */ - hsize_t nelmts; /* number of elements in dataset */ - int rank = 1; /* rank of dataset */ + int rank = 1; /* rank of dataset */ int buf[DIM3]; int chk[DIM3]; int i; @@ -3042,9 +3041,6 @@ test_ninteger(void) /* get dimension */ if (H5Sget_simple_extent_dims(sid1, dims, NULL) < 0) FAIL_STACK_ERROR - nelmts = 1; - for (i = 0; i < rank; i++) - nelmts *= dims[i]; /* read */ if (H5Dread(did1, nid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, chk) < 0) @@ -4564,7 +4564,7 @@ test_vector_io(const char *vfd_name) char filename[1024]; /* filename */ char * buf; /* tmp ptr to buf */ unsigned flags = 0; /* file open flags */ - H5FD_t * lf; /* VFD struct ptr */ + H5FD_t * lf = NULL; /* VFD struct ptr */ uint32_t i; /* index */ uint32_t j; /* index */ uint32_t count = VECTOR_LEN; /* length of vectors */ @@ -5118,7 +5118,7 @@ test_selection_io(const char *vfd_name) hid_t fapl_id = -1; /* file access property list ID */ char filename[1024]; /* filename */ unsigned flags = 0; /* file open flags */ - H5FD_t * lf; /* VFD struct ptr */ + H5FD_t * lf = NULL; /* VFD struct ptr */ int i; /* index */ int j; /* index */ int i2; /* index */ diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index c30c08f..228893a 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -1657,7 +1657,6 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain hid_t space = H5I_INVALID_HID; hid_t type = H5I_INVALID_HID; hsize_t size[H5S_MAX_RANK]; - hsize_t nelmts = 1; int ndims; int i; H5S_class_t space_type; @@ -1699,10 +1698,8 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain case H5S_SIMPLE: /* simple dataspace */ h5tools_str_append(&buffer, " {"); - for (i = 0; i < ndims; i++) { + for (i = 0; i < ndims; i++) h5tools_str_append(&buffer, "%s%" PRIuHSIZE, i ? ", " : "", size[i]); - nelmts *= size[i]; - } h5tools_str_append(&buffer, "}\n"); h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0); |