[libromdata] CisoPspDlopen.hpp: Fix build warnings and errors in no-LZ4/no-LZO builds.
Some checks are pending
Codecov / run (push) Waiting to run
CodeQL / Analyze (cpp) (push) Waiting to run

NOTE: Disabling LZ4 and LZO entirely prevents the libraries from
being loaded at all. This currently results in CISOv2 images that
partially load, but fail when an LZ4-compressed block is encountered.
This commit is contained in:
David Korth 2025-06-04 10:48:41 -04:00
parent 3af7964b0c
commit df719e959a

View File

@ -45,6 +45,12 @@ typedef void *HMODULE;
# else
# include <lzo/lzo1x.h>
# endif
#else /* !HAVE_LZO */
typedef uint8_t *lzo_bytep;
typedef size_t lzo_uint, *lzo_uintp;
typedef void *lzo_voidp;
# define LZO_E_OK 0
# define LZO_E_ERROR (-1)
#endif /* HAVE_LZO */
namespace LibRomData {
@ -141,6 +147,10 @@ public:
#ifdef HAVE_LZ4
return ::LZ4_decompress_safe(src, dst, compressedSize, dstCapacity);
#else /* !HAVE_LZ4 */
RP_UNUSED(src);
RP_UNUSED(dst);
RP_UNUSED(compressedSize);
RP_UNUSED(dstCapacity);
return -1;
#endif /* HAVE_LZ4 */
}
@ -207,6 +217,11 @@ public:
#ifdef HAVE_LZO
return ::lzo1x_decompress_safe(src, src_len, dst, dst_len, wrkmem);
#else /* !HAVE_LZO */
RP_UNUSED(src);
RP_UNUSED(src_len);
RP_UNUSED(dst);
RP_UNUSED(dst_len);
RP_UNUSED(wrkmem);
return LZO_E_ERROR;
#endif /* HAVE_LZO */
}