From 5553a7da456edbfe4755281e681b0c480b156641 Mon Sep 17 00:00:00 2001 From: "[anp/hsw]" Date: Fri, 16 Aug 2024 19:12:43 +0700 Subject: [PATCH] fix compiler warnings: -Wunused --- nfq/conntrack.c | 1 - nfq/nfqws.c | 2 +- tpws/tamper.c | 1 - tpws/tpws_conn.c | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/nfq/conntrack.c b/nfq/conntrack.c index a03c16b..58226fd 100644 --- a/nfq/conntrack.c +++ b/nfq/conntrack.c @@ -200,7 +200,6 @@ static void ConntrackFeedPacket(t_ctrack *t, bool bReverse, const struct tcphdr static bool ConntrackPoolDoubleSearchPool(t_conntrack_pool **pp, const struct ip *ip, const struct ip6_hdr *ip6, const struct tcphdr *tcphdr, const struct udphdr *udphdr, t_ctrack **ctrack, bool *bReverse) { - bool b_rev; t_conn conn,connswp; t_conntrack_pool *ctr; diff --git a/nfq/nfqws.c b/nfq/nfqws.c index 212ed2f..6c9abc2 100644 --- a/nfq/nfqws.c +++ b/nfq/nfqws.c @@ -741,7 +741,7 @@ static bool wf_make_filter( const char *pf_tcp_src, const char *pf_tcp_dst, const char *pf_udp_src, const char *pf_udp_dst) { - char pf_src_buf[512],pf_dst_buf[512],iface[64]; + char pf_dst_buf[512],iface[64]; const char *pf_dst; const char *f_tcpin = *pf_tcp_src ? *params.hostlist_auto_filename ? "(" DIVERT_TCP_INBOUNDS " or (" DIVERT_HTTP_REDIRECT "))" : DIVERT_TCP_INBOUNDS : ""; diff --git a/tpws/tamper.c b/tpws/tamper.c index e326198..56ad6ba 100644 --- a/tpws/tamper.c +++ b/tpws/tamper.c @@ -183,7 +183,6 @@ void tamper_out(t_ctrack *ctrack, uint8_t *segment,size_t segment_buffer_size,si else if (IsTLSClientHello(segment,*size,false)) { size_t tpos=0,spos=0; - const uint8_t *ext; if (!ctrack->l7proto) ctrack->l7proto=TLS; diff --git a/tpws/tpws_conn.c b/tpws/tpws_conn.c index fd66cf1..b88b429 100644 --- a/tpws/tpws_conn.c +++ b/tpws/tpws_conn.c @@ -336,7 +336,7 @@ static bool proxy_remote_conn_ack(tproxy_conn_t *conn, int sock_err) //Returns -1 if something fails, >0 on success (socket fd). static int connect_remote(const struct sockaddr *remote_addr, bool bApplyConnectionFooling) { - int remote_fd = 0, yes = 1, no = 0, v; + int remote_fd = 0, yes = 1, no = 0; if((remote_fd = socket(remote_addr->sa_family, SOCK_STREAM, 0)) < 0)