summaryrefslogtreecommitdiffstats
path: root/src/H5Z.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-02-09 13:46:16 (GMT)
committerGitHub <noreply@github.com>2023-02-09 13:46:16 (GMT)
commitd61fd4aba721db789477027924f4e3aff313f7b6 (patch)
treee339150fca9b54e801d74d08f42d6aa0dc50c2ed /src/H5Z.c
parent509fe962d42b3f02d356d2668b04712df06daf7f (diff)
downloadhdf5-d61fd4aba721db789477027924f4e3aff313f7b6.zip
hdf5-d61fd4aba721db789477027924f4e3aff313f7b6.tar.gz
hdf5-d61fd4aba721db789477027924f4e3aff313f7b6.tar.bz2
Add szip/libaec to GitHub CI and fix warnings (#2438)
szip (or libaec) is currently not tested in CI. This adds szip to the the Autotools GitHub CI actions on Linux when building with the Autotools. This PR also cleans up a few warnings that remained in the szip- related code so the -Werror check will pass.
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: