Stuff that comes back from ep_alloc() is properly aligned for all uses;
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 22 Apr 2011 03:34:39 +0000 (03:34 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 22 Apr 2011 03:34:39 +0000 (03:34 +0000)
that's why it returns "void *", not "guint8 *".  Don't pointer-convert
that information away; otherwise, compilers might whine at you about
unsafe casts.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36793 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-ieee802154.c

index 0a8fcb3719f9b630f2457e4587273a1964172433..cf8f2e520dddd7b25984775024ec74aa339166ad 100644 (file)
@@ -777,7 +777,7 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
     }
     else if (packet->dst_addr_mode == IEEE802154_FCF_ADDR_EXT) {
         /* Dynamic (not stack) memory required for address column. */
-        gchar    *addr = ep_alloc(8);
+        void     *addr = ep_alloc(8);
         gchar    *dst, *dst_oui;
 
         /* Get the address */
@@ -897,7 +897,7 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
     }
     else if (packet->src_addr_mode == IEEE802154_FCF_ADDR_EXT) {
         /* Dynamic (not stack) memory required for address column. */
-        gchar   *addr = ep_alloc(8);
+        void    *addr = ep_alloc(8);
         gchar   *src, *src_oui;
 
         /* Get the address. */