radiotap / radiotap-library

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

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

Open mrsaad381 opened 1 month ago

mrsaad381 commented 1 month 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 1 month 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?