summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-07-18 14:35:21 (GMT)
committerGitHub <noreply@github.com>2022-07-18 14:35:21 (GMT)
commit08b797de73f0ff2ed8bfa3904b42064b26373e96 (patch)
tree54ddf2cd5273c2eccc2196277b152ae2dbdd0d87 /tools
parent9b53b2f6ca41ade0152e6f4a091ec387b44e9c97 (diff)
downloadhdf5-08b797de73f0ff2ed8bfa3904b42064b26373e96.zip
hdf5-08b797de73f0ff2ed8bfa3904b42064b26373e96.tar.gz
hdf5-08b797de73f0ff2ed8bfa3904b42064b26373e96.tar.bz2
Fixes warnings when the deflate filter is not built (#1904)
* Fixes warnings when the deflate filter is not built * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/test/h5diff/h5diffgentest.c4
-rw-r--r--tools/test/h5repack/h5repacktst.c12
2 files changed, 11 insertions, 5 deletions
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index 5e0f830..66d9f42 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -2059,7 +2059,6 @@ gen_dataset_idx(const char *file, int format)
{
hid_t fid = H5I_INVALID_HID; /* file id */
hid_t did = H5I_INVALID_HID;
- hid_t did2 = H5I_INVALID_HID; /* dataset id */
hid_t sid = H5I_INVALID_HID; /* space id */
hid_t fapl = H5I_INVALID_HID; /* file access property id */
hid_t dcpl = H5I_INVALID_HID; /* dataset creation property id */
@@ -2068,6 +2067,9 @@ gen_dataset_idx(const char *file, int format)
herr_t status; /* return status */
int buf[10]; /* data buffer */
int i; /* local index variable */
+#if defined(H5_HAVE_FILTER_DEFLATE)
+ hid_t did2 = H5I_INVALID_HID; /* dataset id */
+#endif
/* Get a copy of the file aaccess property */
fapl = H5Pcreate(H5P_FILE_ACCESS);
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index 028939a..b89a501 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -2526,12 +2526,16 @@ error:
static int
make_deflate(hid_t loc_id)
{
- hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list */
- hid_t sid = H5I_INVALID_HID; /* dataspace ID */
- hsize_t dims[RANK] = {DIM1, DIM2};
- hsize_t chunk_dims[RANK] = {CDIM1, CDIM2};
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hsize_t dims[RANK] = {DIM1, DIM2};
+ hsize_t chunk_dims[RANK] = {CDIM1, CDIM2};
+#if defined(H5_HAVE_FILTER_DEFLATE)
hobj_ref_t bufref[1]; /* reference */
hsize_t dims1r[1] = {1};
+#else
+ (void)loc_id;
+#endif
/* Create and fill array */
struct {