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
ci: fix and test with Wunused-macros #10808
ci: fix and test with Wunused-macros #10808
Conversation
WARNING:
Pipeline 20015 |
src/source-af-packet.c
Outdated
struct bpf_program { | ||
unsigned int bf_len; | ||
struct bpf_insn *bf_insns; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that we need this one? https://github.com/OISF/suricata/actions/runs/8652209800/job/23724605678#step:12:54
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not, but this is include hell :
bpf_program
may be defined by both kernel bpf.h and by libpcap pcap.h (and other like bpf_insn)
So, we should only be using either pcap or bpf in each C file, but this is not the case here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bpf.h is needed for bpf_map_update_elem(mapd, key, value, BPF_NOEXIST)
pcap.h is needed for PCAP_ERRBUF_SIZE
and SCBPFCompile
a76427b
to
ad9f8c5
Compare
Ticket: 6937
ad9f8c5
to
4c84c1d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10808 +/- ##
==========================================
- Coverage 82.73% 82.66% -0.07%
==========================================
Files 927 928 +1
Lines 247785 247914 +129
==========================================
- Hits 204996 204947 -49
- Misses 42789 42967 +178
Flags with carried forward coverage won't be shown. Click here to find out more. |
Replaced by #10814 |
Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/6937
Describe changes:
-Wunused-macros
and test in CI with default C flags#10804 which should be good for CI