Cast away some warnings about alignment; ep_alloc() guarantees
sufficient alignment for all types of data. svn path=/trunk/; revision=37190
This commit is contained in:
parent
4530909323
commit
f153eb070b
|
@ -3059,7 +3059,7 @@ get_eui64_name(const guint64 addr_eui64)
|
|||
guint8 *addr = ep_alloc(8);
|
||||
|
||||
/* Copy and convert the address to network byte order. */
|
||||
*(guint64 *)(addr) = pntoh64(&(addr_eui64));
|
||||
*(guint64 *)(void *)(addr) = pntoh64(&(addr_eui64));
|
||||
|
||||
if ((gbl_resolv_flags & RESOLV_MAC) && !eth_resolution_initialized) {
|
||||
initialize_ethers();
|
||||
|
@ -3084,7 +3084,7 @@ get_eui64_name_if_known(const guint64 addr_eui64)
|
|||
guint8 *addr = ep_alloc(8);
|
||||
|
||||
/* Copy and convert the address to network byte order. */
|
||||
*(guint64 *)(addr) = pntoh64(&(addr_eui64));
|
||||
*(guint64 *)(void *)(addr) = pntoh64(&(addr_eui64));
|
||||
|
||||
if (!eth_resolution_initialized) {
|
||||
initialize_ethers();
|
||||
|
|
|
@ -334,7 +334,7 @@ eui64_to_str(const guint64 ad) {
|
|||
buf=ep_alloc(EUI64_STR_LEN);
|
||||
|
||||
/* Copy and convert the address to network byte order. */
|
||||
*(guint64 *)(p_eui64) = pntoh64(&(ad));
|
||||
*(guint64 *)(void *)(p_eui64) = pntoh64(&(ad));
|
||||
|
||||
sprintf(buf, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x",
|
||||
p_eui64[0], p_eui64[1], p_eui64[2], p_eui64[3],
|
||||
|
|
|
@ -528,7 +528,7 @@ eui64_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, char *buf)
|
|||
guint8 *p_eui64 = ep_alloc(8);
|
||||
|
||||
/* Copy and convert the address to network byte order. */
|
||||
*(guint64 *)(p_eui64) = pntoh64(&(fv->value.integer64));
|
||||
*(guint64 *)(void *)(p_eui64) = pntoh64(&(fv->value.integer64));
|
||||
|
||||
sprintf(buf, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x",
|
||||
p_eui64[0], p_eui64[1], p_eui64[2], p_eui64[3],
|
||||
|
|
Loading…
Reference in New Issue