🐞 fix(warning as error): fix unused parameter warning
This commit is contained in:
@@ -117,6 +117,7 @@ static inline uint32_t gre1_hdr_get_ack(const struct gre1_hdr *hdr)
|
||||
|
||||
static inline uint16_t calc_gre1_hdr_len(const char *data, uint32_t len)
|
||||
{
|
||||
if(data==NULL||len<sizeof(struct gre1_hdr))return 0;
|
||||
const struct gre1_hdr *hdr = (const struct gre1_hdr *)data;
|
||||
uint16_t hdr_len = 8;
|
||||
uint16_t flags = gre1_hdr_get_flags(hdr);
|
||||
|
||||
@@ -12,7 +12,7 @@ struct tunnel_detector
|
||||
int (*identify_func)(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2);
|
||||
};
|
||||
|
||||
static int is_ipv4_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2)
|
||||
static int is_ipv4_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2 __attribute__((unused)))
|
||||
{
|
||||
if (curr && curr->proto == LAYER_PROTO_IPV4 &&
|
||||
next1 && (next1->proto == LAYER_PROTO_IPV4 || next1->proto == LAYER_PROTO_IPV6))
|
||||
@@ -23,7 +23,7 @@ static int is_ipv4_tunnel(const struct raw_layer *curr, const struct raw_layer *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int is_ipv6_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2)
|
||||
static int is_ipv6_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next __attribute__((unused)))
|
||||
{
|
||||
if (curr && curr->proto == LAYER_PROTO_IPV6 &&
|
||||
next1 && (next1->proto == LAYER_PROTO_IPV4 || next1->proto == LAYER_PROTO_IPV6))
|
||||
@@ -34,7 +34,7 @@ static int is_ipv6_tunnel(const struct raw_layer *curr, const struct raw_layer *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int is_gre_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2)
|
||||
static int is_gre_tunnel(const struct raw_layer *curr, const struct raw_layer *next1, const struct raw_layer *next2 __attribute__((unused)))
|
||||
{
|
||||
if (curr && (curr->proto == LAYER_PROTO_IPV4 || curr->proto == LAYER_PROTO_IPV6) &&
|
||||
next1 && next1->proto == LAYER_PROTO_GRE)
|
||||
|
||||
Reference in New Issue
Block a user