diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2008-07-09 21:22:00 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2008-07-09 21:22:00 +0000 |
commit | 8580c6ab54ebdf33c431a08d17db17ba63a52ea2 (patch) | |
tree | 3354f0c86073fc23be65060c959d14f46c02456d /epan/dissectors/packet-armagetronad.c | |
parent | 9bd70e0d1d060b6f0b1760c207301705ed48f13b (diff) |
Don't declare a char[] then cast it into a guint16 to use it as both a guint16 and a char: the char[] alignment may not be correct for a guint16. Instead declare a guint16[] and cast it to char when needed. This is still weird but it fixes a Solaris/SPARC warning.
svn path=/trunk/; revision=25693
Diffstat (limited to 'epan/dissectors/packet-armagetronad.c')
-rw-r--r-- | epan/dissectors/packet-armagetronad.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-armagetronad.c b/epan/dissectors/packet-armagetronad.c index 5a5326baaf..2f196a6d37 100644 --- a/epan/dissectors/packet-armagetronad.c +++ b/epan/dissectors/packet-armagetronad.c @@ -145,7 +145,7 @@ static void add_message_data(tvbuff_t * tvb, gint offset, gint data_len, proto_tree * tree) { - guchar *data = NULL; + guint16 *data = NULL; if (tree) { data = tvb_memcpy(tvb, ep_alloc(data_len + 1), offset, data_len); @@ -153,8 +153,8 @@ add_message_data(tvbuff_t * tvb, gint offset, gint data_len, } if (data) { - guint16 *ptr, *end = (guint16*) &data[data_len]; - for (ptr = (guint16*) data; ptr != end; ptr++) { + guint16 *ptr, *end = &data[data_len]; + for (ptr = data; ptr != end; ptr++) { /* * There must be a better way to tell * Wireshark not to stop on null bytes |