On Sun, 3 Mar 2024 14:51:05 +0100 Laurent Vivier <lvivier(a)redhat.com> wrote:v5: - add a patch to cleanup before change: udp: little cleanup in udp_update_hdrX() to prepare future changes - see detailed v5 history log in each patchI'm about to apply this, but cppcheck (2.10) tells me (with make cppcheck): checksum.c:195:33: style: inconclusive: Function 'csum_icmp4' argument 1 names different: declaration 'ih' definition 'icmp4hr'. [funcArgNamesDifferent] void csum_icmp4(struct icmphdr *icmp4hr, const void *payload, size_t len) ^ checksum.h:23:33: note: Function 'csum_icmp4' argument 1 names different: declaration 'ih' definition 'icmp4hr'. void csum_icmp4(struct icmphdr *ih, const void *payload, size_t len); ^ checksum.c:195:33: note: Function 'csum_icmp4' argument 1 names different: declaration 'ih' definition 'icmp4hr'. void csum_icmp4(struct icmphdr *icmp4hr, const void *payload, size_t len) ^ pcap.c:145:47: style: inconclusive: Function 'pcap_iov' argument 2 names different: declaration 'n' definition 'iovcnt'. [funcArgNamesDifferent] void pcap_iov(const struct iovec *iov, size_t iovcnt) ^ pcap.h:12:47: note: Function 'pcap_iov' argument 2 names different: declaration 'n' definition 'iovcnt'. void pcap_iov(const struct iovec *iov, size_t n); ^ pcap.c:145:47: note: Function 'pcap_iov' argument 2 names different: declaration 'n' definition 'iovcnt'. void pcap_iov(const struct iovec *iov, size_t iovcnt) ^ tcp.c:947:45: error: Expression 'tlen,IPPROTO_TCP,(struct in_addr){.s_addr=iph->saddr},(struct in_addr){.s_addr=iph->daddr}' depends on order of evaluation of side effects [unknownEvaluationOrder] (struct in_addr){ .s_addr = iph->saddr }, ^ checksum.c:506:0: style: The function 'csum_iov' is never used. [unusedFunction] uint16_t csum_iov(struct iovec *iov, size_t n, uint32_t init) ^ pcap.c:145:0: style: The function 'pcap_iov' is never used. [unusedFunction] void pcap_iov(const struct iovec *iov, size_t iovcnt) ^ iov.c:150:0: information: Unmatched suppression: unusedFunction [unmatchedSuppression] size_t iov_size(const struct iovec *iov, size_t iov_cnt) ^ they are almost all trivial and I plan to fix them up on merge, but I still have to look into the initialisation in tcp_update_check_tcp4() (tcp.c:947:45). -- Stefano