Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mrsaad381 opened this issue Aug 24, 2024 · 1 comment
Open

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

mrsaad381 opened this issue Aug 24, 2024 · 1 comment

Comments

@mrsaad381
Copy link

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
Copy link
Contributor

jmberg commented Aug 28, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants