2c4af523dd
Clang rejects a declared (but never defined and never used) `static`
function. Change the declaration to be the value of a macro that will
be expanded only when the function is both defined and used.
Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/295>
Fixes: 55822d0b4d
("Add wrappers for more precise Valgrind physfs diagnostics")
31 lines
919 B
C
31 lines
919 B
C
#include "dxxsconf.h"
|
|
|
|
#ifndef DXX_ENABLE_wrap_PHYSFS_write
|
|
#define DXX_ENABLE_wrap_PHYSFS_write DXX_HAVE_POISON_VALGRIND
|
|
#endif
|
|
|
|
#if DXX_ENABLE_wrap_PHYSFS_write
|
|
#include <physfs.h>
|
|
extern "C" {
|
|
DXX_VG_DECLARE_EXTERN_C(PHYSFS_write);
|
|
DXX_VG_DECLARE_EXTERN_C(PHYSFS_writeSBE16);
|
|
DXX_VG_DECLARE_EXTERN_C(PHYSFS_writeSBE32);
|
|
DXX_VG_DECLARE_EXTERN_C(PHYSFS_writeSLE16);
|
|
DXX_VG_DECLARE_EXTERN_C(PHYSFS_writeSLE32);
|
|
DXX_VG_DECLARE_EXTERN_C(PHYSFS_writeULE16);
|
|
DXX_VG_DECLARE_EXTERN_C(PHYSFS_writeULE32);
|
|
}
|
|
|
|
#ifdef DXX_VG_DECLARE_WRITE_HELPER
|
|
DXX_VG_DECLARE_WRITE_HELPER;
|
|
#endif
|
|
|
|
DXX_VG_DEFINE_WRITE(PHYSFS_writeSBE16, PHYSFS_sint16);
|
|
DXX_VG_DEFINE_WRITE(PHYSFS_writeSBE32, PHYSFS_sint32);
|
|
DXX_VG_DEFINE_WRITE(PHYSFS_writeSLE16, PHYSFS_sint16);
|
|
DXX_VG_DEFINE_WRITE(PHYSFS_writeSLE32, PHYSFS_sint32);
|
|
DXX_VG_DEFINE_WRITE(PHYSFS_writeULE16, PHYSFS_uint16);
|
|
DXX_VG_DEFINE_WRITE(PHYSFS_writeULE32, PHYSFS_uint32);
|
|
|
|
#endif
|