From b07cd62d075e4a386138e8488f6c1d8bbe08d59f Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 22 Apr 2011 04:04:20 +0000 Subject: We deal with pointer alignment ourselves, so we ensure the casts are safe. Tell the compiler so. svn path=/trunk/; revision=36796 --- epan/in_cksum.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'epan/in_cksum.c') diff --git a/epan/in_cksum.c b/epan/in_cksum.c index d085200a2c..dfb2313468 100644 --- a/epan/in_cksum.c +++ b/epan/in_cksum.c @@ -75,7 +75,7 @@ in_cksum(const vec_t *vec, int veclen) for (; veclen != 0; vec++, veclen--) { if (vec->len == 0) continue; - w = (const guint16 *)vec->ptr; + w = (const guint16 *)(void *)vec->ptr; if (mlen == -1) { /* * The first byte of this chunk is the continuation @@ -87,7 +87,7 @@ in_cksum(const vec_t *vec, int veclen) */ s_util.c[1] = *(const guint8 *)w; sum += s_util.s; - w = (const guint16 *)((const guint8 *)w + 1); + w = (const guint16 *)(void *)((const guint8 *)w + 1); mlen = vec->len - 1; } else mlen = vec->len; @@ -98,7 +98,7 @@ in_cksum(const vec_t *vec, int veclen) REDUCE; sum <<= 8; s_util.c[0] = *(const guint8 *)w; - w = (const guint16 *)((const guint8 *)w + 1); + w = (const guint16 *)(void *)((const guint8 *)w + 1); mlen--; byte_swapped = 1; } -- cgit v1.2.1