tcpdump mailing list archives
RFC Almost trivial unused-parameter patch (and lots of questions)
From: Joerg Mayer <jmayer () loplof de>
Date: Sat, 31 Mar 2018 19:41:23 +0200
Hello, attached a patch with the almost trivial fixes for -Wunused-paramter warnings. The reason I'm sending this as a mail is, that while the patches look trivial I'm not sure that they are always the correct approach: - Why was envp[] part of the main() declaration? - Is adding varattrs.h to rpcapd/rpcapd.c the correct approach to add _U_? - IMO with these silenced, we can add the warning to devel. The remaining warnings need someone with better understanding of the code to fix: - rpcapd/daemon.c:1538:183: warning: unused parameter 'samp_param' could be silenced by removing it, or by removing the #if 0 around "// Apply sampling parameters" - bpf/net/bpf_filter.c:214:61: warning: unused parameter 'aux_data' led to the following questions: + Is it correct to assume that neither KERNEL nor _KERNEL will be defined anymore? + Is it correct to assume that SKF_AD_VLAN_TAG will be defined if SKF_AD_VLAN_TAG_PRESENT is defined? + Is it correct that the sequence "ANCILLARY(VLAN_TAG);ANCILLARY(VLAN_TAG_PRESENT);" doesn't make too much sense, once the "break;" at the end of the macro is expanded? + ==> This file looks like it is containing a bit of no longer needed code. - pcap-rpcap.c:837:81: warning: unused parameter 'mode' also led to some questions: + Why is pcap_stats_ex_rpcap() limited to win32? + Does it make sense to have REMOTE as a compile time flag? In case it does: + Does it make sense to check for REMOTE in pcap-rpcap.c? Kind regards Jörg -- Joerg Mayer <jmayer () loplof de> We are stuck with technology when what we really want is just stuff that works. Some say that should read Microsoft instead of technology.
Attachment:
0001-Fix-Wunused-paramter-warnings-that-are-almost-trivia.patch
Description:
_______________________________________________ tcpdump-workers mailing list tcpdump-workers () lists tcpdump org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Current thread:
- RFC Almost trivial unused-parameter patch (and lots of questions) Joerg Mayer (Mar 31)