diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-04-22 04:04:20 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-04-22 04:04:20 +0000 |
commit | b07cd62d075e4a386138e8488f6c1d8bbe08d59f (patch) | |
tree | fcc69d094a3d9ebec523cad9b0db8875cdcc1471 /epan/in_cksum.c | |
parent | 384d06a027e287eee919b426be7165a9468d9197 (diff) | |
download | wireshark-b07cd62d075e4a386138e8488f6c1d8bbe08d59f.tar.gz |
We deal with pointer alignment ourselves, so we ensure the casts are
safe. Tell the compiler so.
svn path=/trunk/; revision=36796
Diffstat (limited to 'epan/in_cksum.c')
-rw-r--r-- | epan/in_cksum.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |