]> The Tcpdump Group git mirrors - tcpdump/commitdiff
RT6: Declare the struct tok srh_tlv_type "static"
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 18 Apr 2023 16:00:36 +0000 (18:00 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 18 Apr 2023 16:04:49 +0000 (18:04 +0200)
This should avoid error like:
./print-rt6.c:36:18: error: no previous extern declaration for
non-static variable 'srh_tlv_type' [-Werror,-Wmissing-variable-declarations]
const struct tok srh_tlv_type[] = {
                 ^
./print-rt6.c:36:7: note: declare 'static' if the variable is not
intended to be used outside of this translation unit
const struct tok srh_tlv_type[] = {
      ^

print-rt6.c

index 62db9a21b0ff604335a4d7210f5723369570fe50..0478f382786a5289a72b2808c0ce63d85c17ad4f 100644 (file)
@@ -33,7 +33,7 @@
 
 #include "ip6.h"
 
 
 #include "ip6.h"
 
-const struct tok srh_tlv_type[] = {
+static const struct tok srh_tlv_type[] = {
     { IPV6_SRH_TLV_PAD1, "Pad1"},
     { IPV6_SRH_TLV_PADN, "PadN"},
     { IPV6_SRH_TLV_HMAC, "HMAC"},
     { IPV6_SRH_TLV_PAD1, "Pad1"},
     { IPV6_SRH_TLV_PADN, "PadN"},
     { IPV6_SRH_TLV_HMAC, "HMAC"},