From 4a2adc8ca205c3f3786ec4237e3ca91a4bebba99 Mon Sep 17 00:00:00 2001 From: "[anp/hsw]" Date: Fri, 16 Aug 2024 19:31:16 +0700 Subject: [PATCH] fix compiler warnings: -Wunused (part2) --- nfq/darkmagic.c | 1 - nfq/desync.c | 1 - nfq/protocol.c | 2 +- tpws/tamper.c | 2 -- tpws/tpws.c | 1 - tpws/tpws_conn.c | 3 --- 6 files changed, 1 insertion(+), 9 deletions(-) diff --git a/nfq/darkmagic.c b/nfq/darkmagic.c index 1a859c9..2240cce 100644 --- a/nfq/darkmagic.c +++ b/nfq/darkmagic.c @@ -1610,7 +1610,6 @@ static bool set_socket_fwmark(int sock, uint32_t fwmark) static int rawsend_socket(sa_family_t family) { - int yes=1; int *sock = rawsend_family_sock(family); if (!sock) return -1; diff --git a/nfq/desync.c b/nfq/desync.c index 534ff6e..674ec3c 100644 --- a/nfq/desync.c +++ b/nfq/desync.c @@ -1262,7 +1262,6 @@ static uint8_t dpi_desync_udp_packet_play(bool replay, size_t reasm_offset, uint uint8_t clean[16384], *pclean; size_t clean_len; - bool bIsHello = false; if (replay) { diff --git a/nfq/protocol.c b/nfq/protocol.c index 04f8f04..a211963 100644 --- a/nfq/protocol.c +++ b/nfq/protocol.c @@ -210,7 +210,7 @@ bool TLSFindExtInHandshake(const uint8_t *data, size_t len, uint16_t type, const // // u16 ExtensionsLength - size_t l, ll; + size_t l; if (!bPartialIsOK && !IsTLSHandshakeFull(data,len)) return false; diff --git a/tpws/tamper.c b/tpws/tamper.c index 6cbecbe..56ad6ba 100644 --- a/tpws/tamper.c +++ b/tpws/tamper.c @@ -15,7 +15,6 @@ void tamper_out(t_ctrack *ctrack, uint8_t *segment,size_t segment_buffer_size,si size_t method_len = 0, pos; const char *method; bool bBypass = false, bHaveHost = false, bHostExcluded = false; - char bRemovedHostSpace = 0; char *pc, Host[256]; DBGPRINT("tamper_out") @@ -119,7 +118,6 @@ void tamper_out(t_ctrack *ctrack, uint8_t *segment,size_t segment_buffer_size,si VPRINT("Removing space before host name at pos %zu", pos) memmove(p - 1, p, *size - pos); (*size)--; // block will shrink by 1 byte - bRemovedHostSpace = 1; } if (params.hostcase && HttpFindHost(&pHost,segment,*size)) { diff --git a/tpws/tpws.c b/tpws/tpws.c index 430420c..1de0e22 100644 --- a/tpws/tpws.c +++ b/tpws/tpws.c @@ -850,7 +850,6 @@ static bool find_listen_addr(struct sockaddr_storage *salisten, const char *bind { struct ifaddrs *addrs,*a; bool found=false; - bool bindll_want = bindll==prefer || bindll==force; if (getifaddrs(&addrs)<0) return false; diff --git a/tpws/tpws_conn.c b/tpws/tpws_conn.c index dba1ca1..23df5df 100644 --- a/tpws/tpws_conn.c +++ b/tpws/tpws_conn.c @@ -876,10 +876,7 @@ static bool handle_proxy_mode(tproxy_conn_t *conn, struct tailhead *conn_list) break; case S5_ATYP_DOM: { - struct addrinfo *ai,hints; - int r; uint16_t port; - char sport[6]; if (params.no_resolve) {