diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-04-22 06:25:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-22 06:25:12 (GMT) |
commit | 7707859279a60b32d2b6c915442a7c04d44445b4 (patch) | |
tree | 890d16aa2408b270368b36ea4f05ca20fe2f16f6 /src/H5Z.c | |
parent | a4371b6fce577852691dfdeac642dec1dd4b9453 (diff) | |
download | hdf5-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.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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: |