radiotap / radiotap-library

radiotap parser C library
ISC License
108 stars 65 forks source link

iterator->_next_bitmap = &radiotap_header->it_present; #17

Open mrsaad381 opened 3 months ago

mrsaad381 commented 3 months ago

radiotap.c: In function ‘ieee80211_radiotap_iterator_init’: radiotap.c:167:27: warning: taking address of packed member of ‘struct ieee80211_radiotap_header’ may result in an unaligned pointer value [-Waddress-of-packed-member] 167 | iterator->_next_bitmap = &radiotap_header->it_present; | ^~~~~~~~

  this code is included in openwifi its give me above error
  radiotap.c: In function ‘ieee80211_radiotap_iterator_init’:

radiotap.c:167:27: warning: taking address of packed member of ‘struct ieee80211_radiotap_header’ may result in an unaligned pointer value [-Waddress-of-packed-member] 167 | iterator->_next_bitmap = &radiotap_header->it_present; | ^~~~~~~~

jmberg commented 2 months ago

That kind of seems both correct and not - if the packet is aligned then the it_present will also aligned, but then we also don't need the packed attribute ...

Maybe remove that and see if it works that way?