diff options
author | obrien <obrien@FreeBSD.org> | 2003-10-15 20:05:57 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2003-10-15 20:05:57 +0000 |
commit | 8eb262a2d5cb9805fd1a7ce374beca5787bb43f5 (patch) | |
tree | a10eaedc3e947d5dbc2fd9fb4d911af5d240c287 /sys | |
parent | c7ba6f536adf4c67536ab613240ae450eaa2a104 (diff) | |
download | FreeBSD-src-8eb262a2d5cb9805fd1a7ce374beca5787bb43f5.zip FreeBSD-src-8eb262a2d5cb9805fd1a7ce374beca5787bb43f5.tar.gz |
Quiet warnings about mis-matched pointer assignment.
Tested on: PowerPC
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/endian.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sys/sys/endian.h b/sys/sys/endian.h index 01af506..35a4380 100644 --- a/sys/sys/endian.h +++ b/sys/sys/endian.h @@ -94,7 +94,7 @@ typedef __uint64_t uint64_t; static __inline uint16_t be16dec(const void *pp) { - unsigned char const *p = pp; + unsigned char const *p = (unsigned char const *)pp; return ((p[0] << 8) | p[1]); } @@ -102,7 +102,7 @@ be16dec(const void *pp) static __inline uint32_t be32dec(const void *pp) { - unsigned char const *p = pp; + unsigned char const *p = (unsigned char const *)pp; return ((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]); } @@ -110,7 +110,7 @@ be32dec(const void *pp) static __inline uint64_t be64dec(const void *pp) { - unsigned char const *p = pp; + unsigned char const *p = (unsigned char const *)pp; return (((uint64_t)be32dec(p) << 32) | be32dec(p + 4)); } @@ -118,7 +118,7 @@ be64dec(const void *pp) static __inline uint16_t le16dec(const void *pp) { - unsigned char const *p = pp; + unsigned char const *p = (unsigned char const *)pp; return ((p[1] << 8) | p[0]); } @@ -126,7 +126,7 @@ le16dec(const void *pp) static __inline uint32_t le32dec(const void *pp) { - unsigned char const *p = pp; + unsigned char const *p = (unsigned char const *)pp; return ((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | p[0]); } @@ -134,7 +134,7 @@ le32dec(const void *pp) static __inline uint64_t le64dec(const void *pp) { - unsigned char const *p = pp; + unsigned char const *p = (unsigned char const *)pp; return (((uint64_t)le32dec(p + 4) << 32) | le32dec(p)); } @@ -142,7 +142,7 @@ le64dec(const void *pp) static __inline void be16enc(void *pp, uint16_t u) { - unsigned char *p = pp; + unsigned char *p = (unsigned char *)pp; p[0] = (u >> 8) & 0xff; p[1] = u & 0xff; @@ -151,7 +151,7 @@ be16enc(void *pp, uint16_t u) static __inline void be32enc(void *pp, uint32_t u) { - unsigned char *p = pp; + unsigned char *p = (unsigned char *)pp; p[0] = (u >> 24) & 0xff; p[1] = (u >> 16) & 0xff; @@ -162,7 +162,7 @@ be32enc(void *pp, uint32_t u) static __inline void be64enc(void *pp, uint64_t u) { - unsigned char *p = pp; + unsigned char *p = (unsigned char *)pp; be32enc(p, u >> 32); be32enc(p + 4, u & 0xffffffff); @@ -171,7 +171,7 @@ be64enc(void *pp, uint64_t u) static __inline void le16enc(void *pp, uint16_t u) { - unsigned char *p = pp; + unsigned char *p = (unsigned char *)pp; p[0] = u & 0xff; p[1] = (u >> 8) & 0xff; @@ -180,7 +180,7 @@ le16enc(void *pp, uint16_t u) static __inline void le32enc(void *pp, uint32_t u) { - unsigned char *p = pp; + unsigned char *p = (unsigned char *)pp; p[0] = u & 0xff; p[1] = (u >> 8) & 0xff; @@ -191,7 +191,7 @@ le32enc(void *pp, uint32_t u) static __inline void le64enc(void *pp, uint64_t u) { - unsigned char *p = pp; + unsigned char *p = (unsigned char *)pp; le32enc(p, u & 0xffffffff); le32enc(p + 4, u >> 32); |