summaryrefslogtreecommitdiffstats
path: root/src/H5Z.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-04-22 06:25:12 (GMT)
committerGitHub <noreply@github.com>2023-04-22 06:25:12 (GMT)
commit7707859279a60b32d2b6c915442a7c04d44445b4 (patch)
tree890d16aa2408b270368b36ea4f05ca20fe2f16f6 /src/H5Z.c
parenta4371b6fce577852691dfdeac642dec1dd4b9453 (diff)
downloadhdf5-7707859279a60b32d2b6c915442a7c04d44445b4.zip
hdf5-7707859279a60b32d2b6c915442a7c04d44445b4.tar.gz
hdf5-7707859279a60b32d2b6c915442a7c04d44445b4.tar.bz2
Merge with develop (#2790)
Diffstat (limited to 'src/H5Z.c')
-rw-r--r--src/H5Z.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/H5Z.c b/src/H5Z.c
index 8ac9b9c..8631b04 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -104,9 +104,15 @@ H5Z_init(void)
HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register deflate filter")
#endif /* H5_HAVE_FILTER_DEFLATE */
#ifdef H5_HAVE_FILTER_SZIP
- H5Z_SZIP->encoder_present = SZ_encoder_enabled();
- if (H5Z_register(H5Z_SZIP) < 0)
- HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register szip filter")
+ {
+ int encoder_enabled = SZ_encoder_enabled();
+ if (encoder_enabled < 0)
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "check for szip encoder failed")
+
+ H5Z_SZIP->encoder_present = (unsigned)encoder_enabled;
+ if (H5Z_register(H5Z_SZIP) < 0)
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register szip filter")
+ }
#endif /* H5_HAVE_FILTER_SZIP */
done: