Fix "'&array' may not produce intended result" warnings with OpenWatcom

Co-authored-by: sezero <sezero@users.noreply.github.com>
This commit is contained in:
Cameron Cawley
2021-07-20 18:03:56 +01:00
parent f542e6df73
commit 78ae375016
4 changed files with 21 additions and 19 deletions

View File

@@ -58,6 +58,8 @@ typedef struct mz_dummy_time_t_tag
#define MZ_MAX(a, b) (((a) > (b)) ? (a) : (b))
#define MZ_MIN(a, b) (((a) < (b)) ? (a) : (b))
#define MZ_CLEAR_OBJ(obj) memset(&(obj), 0, sizeof(obj))
#define MZ_CLEAR_ARR(obj) memset((obj), 0, sizeof(obj))
#define MZ_CLEAR_PTR(obj) memset((obj), 0, sizeof(*obj))
#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
#define MZ_READ_LE16(p) *((const mz_uint16 *)(p))