From 5f1b12059949a37edd10a59e04ab44fa782cb5ee Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 17 Aug 2010 08:45:22 +0200 Subject: s3: Fix a ton of type-punned warnings --- lib/util/byteorder.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/util') diff --git a/lib/util/byteorder.h b/lib/util/byteorder.h index f0a000a063..59ad8371e4 100644 --- a/lib/util/byteorder.h +++ b/lib/util/byteorder.h @@ -185,13 +185,13 @@ static __inline__ void st_le32(uint32_t *addr, const uint32_t val) /* get single value from an SMB buffer */ #define SVAL(buf,pos) (*(const uint16_t *)((const char *)(buf) + (pos))) -#define SVAL_NC(buf,pos) (*(uint16_t *)((char *)(buf) + (pos))) /* Non const version of above. */ +#define SVAL_NC(buf,pos) (*(uint16_t *)((void *)((char *)(buf) + (pos)))) /* Non const version of above. */ #define IVAL(buf,pos) (*(const uint32_t *)((const char *)(buf) + (pos))) -#define IVAL_NC(buf,pos) (*(uint32_t *)((char *)(buf) + (pos))) /* Non const version of above. */ +#define IVAL_NC(buf,pos) (*(uint32_t *)((void *)((char *)(buf) + (pos)))) /* Non const version of above. */ #define SVALS(buf,pos) (*(const int16_t *)((const char *)(buf) + (pos))) -#define SVALS_NC(buf,pos) (*(int16_t *)((char *)(buf) + (pos))) /* Non const version of above. */ +#define SVALS_NC(buf,pos) (*(int16_t *)((void *)((char *)(buf) + (pos)))) /* Non const version of above. */ #define IVALS(buf,pos) (*(const int32_t *)((const char *)(buf) + (pos))) -#define IVALS_NC(buf,pos) (*(int32_t *)((char *)(buf) + (pos))) /* Non const version of above. */ +#define IVALS_NC(buf,pos) (*(int32_t *)((void *)((char *)(buf) + (pos)))) /* Non const version of above. */ /* store single value in an SMB buffer */ #define SSVAL(buf,pos,val) SVAL_NC(buf,pos)=((uint16_t)(val)) -- cgit