From c3ac6f1e71a45693d47b569091f3ee86f0f3d0ba Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 25 Apr 2007 19:28:56 +0000 Subject: [PATCH] Some types of addresses are data structures; make the address data pointer in an address structure a "void *", to indicate that it can point to some arbitrary type of object, rather than a "guint8 *", which indicates that it points to an array of bytes. For any address type where the address is a structure, this removes some alignment warnings; the author of the code to handle a particular address type has the responsibility of making sure you don't set up the address structure with misaligned data. (Yes, it matters, at least on SPARC.) svn path=/trunk/; revision=21563 --- epan/address.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epan/address.h b/epan/address.h index 551d4af0e3..a47046fd54 100644 --- a/epan/address.h +++ b/epan/address.h @@ -60,13 +60,13 @@ typedef enum { typedef struct _address { address_type type; /* type of address */ int len; /* length of address, in bytes */ - const guint8 *data; /* bytes that constitute address */ + const void *data; /* pointer to address data */ } address; #define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \ (addr)->type = (addr_type); \ (addr)->len = (addr_len); \ - (addr)->data = (const void *)(addr_data); \ + (addr)->data = (addr_data); \ } /*