Common (Zlib): don't #define Z_LARGE64

This commit is contained in:
Carter Li
2026-10-10 15:41:07 +08:00
parent be51ba9f15
commit de414b7250
+8 -2
View File
@@ -15,10 +15,9 @@ typedef enum FFZlibGroup : uint8_t {
#if FF_DISABLE_DLOPEN
#define Z_LARGE64 1
#include <zlib.h>
const char* ffZlibLoad([[maybe_unused]] FFZlibGroup group) {
static inline const char* ffZlibLoad([[maybe_unused]] FFZlibGroup group) {
// the library is linked in: nothing to open, nothing to resolve, nothing to fail
return nullptr;
}
@@ -41,10 +40,17 @@ const char* ffZlibLoad([[maybe_unused]] FFZlibGroup group) {
#define Z_EXTERN static inline
#define Z_EXPORT
// Redeclaring everything as `static inline` above means <zlib.h> now defines entry points
// that a given translation unit may not call at all. Silenced for the include only: the
// pragma is popped right after, so the rest of the file -- and the rest of the translation
// unit that includes this header -- still reports unused functions.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"
#include <zlib.h>
#pragma GCC diagnostic pop
#include "common/library.h"
extern struct FFZlibData {