summaryrefslogtreecommitdiff
path: root/lib/util/byteorder.h
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-17 08:45:22 +0200
committerVolker Lendecke <vl@samba.org>2010-08-17 08:53:33 +0200
commit5f1b12059949a37edd10a59e04ab44fa782cb5ee (patch)
tree8ca3f37063f13b14880b3a1aa11cf8b75acf4d55 /lib/util/byteorder.h
parent8f3542c58e843d49dcecd2753f85f45731bd13c0 (diff)
downloadsamba-5f1b12059949a37edd10a59e04ab44fa782cb5ee.tar.gz
samba-5f1b12059949a37edd10a59e04ab44fa782cb5ee.tar.bz2
samba-5f1b12059949a37edd10a59e04ab44fa782cb5ee.zip
s3: Fix a ton of type-punned warnings
Diffstat (limited to 'lib/util/byteorder.h')
-rw-r--r--lib/util/byteorder.h8
1 files changed, 4 insertions, 4 deletions
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))