]> The Tcpdump Group git mirrors - tcpdump/commitdiff
ENC: Lose an unused variable after commit 1de5051.
authorDenis Ovsienko <[email protected]>
Thu, 13 Jan 2022 18:08:00 +0000 (18:08 +0000)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 8 Feb 2022 08:16:08 +0000 (09:16 +0100)
NetBSD 9.2/AArch64
clang version 13.0.0

./print-enc.c:103:8: error: variable 'caplen' set but not used
 [-Werror,-Wunused-but-set-variable]

(cherry picked from commit e1ee2a34a9e8dc5bdc1b69aae8c77f0a5b1ae23c)

print-enc.c

index 9f541c3ccc569b85d7331da319f493bc8ae89bf7..928b02c8870e0eb83534b2d71db45b987edbbc4c 100644 (file)
@@ -100,7 +100,6 @@ enc_if_print(netdissect_options *ndo,
              const struct pcap_pkthdr *h, const u_char *p)
 {
        u_int length = h->len;
-       u_int caplen = h->caplen;
        u_int af, flags;
        const struct enchdr *hdr;
 
@@ -144,7 +143,6 @@ enc_if_print(netdissect_options *ndo,
        ND_PRINT("SPI 0x%08x: ", GET_BE_U_4(hdr->spi));
 
        length -= ENC_HDRLEN;
-       caplen -= ENC_HDRLEN;
        p += ENC_HDRLEN;
 
        switch (af) {