Changeset 6654714 for libpacketdump


Ignore:
Timestamp:
11/15/17 11:59:35 (3 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, dpdk-ndag, etsilive, master, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
Children:
9993cde
Parents:
e844ff2
Message:

Fix various -Waddress-of-packed-member warnings on clang

Most of these fixes are casts to simply hide the issue from the
compiler -- not sure how (or even if) we can fix these properly.

Location:
libpacketdump
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpacketdump/libpacketdump.h

    ree6e802 r6654714  
    4747#define DISPLAYS(hdr,x,fmt) DISPLAY_EXP(hdr,x,fmt,htons(hdr->x))
    4848#define DISPLAYL(hdr,x,fmt) DISPLAY_EXP(hdr,x,fmt,htonl(hdr->x))
    49 #define DISPLAYIP(hdr,x,fmt) DISPLAY_EXP(hdr,x,fmt,inet_ntoa(*(struct in_addr*)&hdr->x))
     49#define DISPLAYIP(hdr,x,fmt) DISPLAY_EXP(hdr,x,fmt,inet_ntoa(*(struct in_addr*)(void *)(&hdr->x)))
    5050
    5151
  • libpacketdump/link_15.c

    ree6e802 r6654714  
    6969       
    7070        /* Check for extended bitmasks */
    71         ptr = (uint32_t *) &(rtap->it_present);
     71        ptr = (uint32_t *) (char *)(&(rtap->it_present));
    7272       
    7373        if ( (rtap_pres) & (1 << TRACE_RADIOTAP_EXT) )
Note: See TracChangeset for help on using the changeset viewer.