Skip to content

Commit

Permalink
Fix warnings when szip isn't present (#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
derobins authored Oct 7, 2024
1 parent dc0ce39 commit 8cc8d85
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hdf/src/cszip.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ static int32 HCIcszip_init(accrec_t *access_rec);

static int32 HCIcszip_decode(compinfo_t *info, int32 length, uint8 *buf);

#ifdef H4_HAVE_LIBSZ
static int32 HCIcszip_encode(compinfo_t *info, int32 length, const uint8 *buf);
#endif

static int32 HCIcszip_term(compinfo_t *info);

Expand Down Expand Up @@ -332,6 +334,7 @@ HCIcszip_decode(compinfo_t *info, int32 length, uint8 *buf)
DESCRIPTION
Common code called to encode SZIP data into a file.
--------------------------------------------------------------------------*/
#ifdef H4_HAVE_LIBSZ
static int32
HCIcszip_encode(compinfo_t *info, int32 length, const uint8 *buf)
{
Expand Down Expand Up @@ -377,6 +380,7 @@ HCIcszip_encode(compinfo_t *info, int32 length, const uint8 *buf)
#endif /* H4_HAVE_SZIP_ENCODER */

} /* end HCIcszip_encode() */
#endif /* H4_HAVE_LIBSZ */

/*--------------------------------------------------------------------------
NAME
Expand Down
4 changes: 4 additions & 0 deletions mfhdf/hrepack/hrepack_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,10 @@ set_szip(int pixels_per_block, /*in */

return 0;
#else
(void)pixels_per_block;
(void)compression_mode;
(void)c_info;

printf("Warning: SZIP compression is not available\n");
return -1;
#endif
Expand Down

0 comments on commit 8cc8d85

Please sign in to comment.