mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-30 05:50:53 +03:00
fix compiler warnings: -Wunused (part2)
This commit is contained in:
parent
c38067b255
commit
aaea80a97c
@ -1609,7 +1609,6 @@ static bool set_socket_fwmark(int sock, uint32_t fwmark)
|
|||||||
|
|
||||||
static int rawsend_socket(sa_family_t family)
|
static int rawsend_socket(sa_family_t family)
|
||||||
{
|
{
|
||||||
int yes=1;
|
|
||||||
int *sock = rawsend_family_sock(family);
|
int *sock = rawsend_family_sock(family);
|
||||||
if (!sock) return -1;
|
if (!sock) return -1;
|
||||||
|
|
||||||
|
@ -1261,7 +1261,6 @@ static uint8_t dpi_desync_udp_packet_play(bool replay, size_t reasm_offset, uint
|
|||||||
|
|
||||||
uint8_t clean[16384], *pclean;
|
uint8_t clean[16384], *pclean;
|
||||||
size_t clean_len;
|
size_t clean_len;
|
||||||
bool bIsHello = false;
|
|
||||||
|
|
||||||
if (replay)
|
if (replay)
|
||||||
{
|
{
|
||||||
|
@ -210,7 +210,7 @@ bool TLSFindExtInHandshake(const uint8_t *data, size_t len, uint16_t type, const
|
|||||||
// <CompressionMethods>
|
// <CompressionMethods>
|
||||||
// u16 ExtensionsLength
|
// u16 ExtensionsLength
|
||||||
|
|
||||||
size_t l, ll;
|
size_t l;
|
||||||
|
|
||||||
if (!bPartialIsOK && !IsTLSHandshakeFull(data,len)) return false;
|
if (!bPartialIsOK && !IsTLSHandshakeFull(data,len)) return false;
|
||||||
|
|
||||||
|
@ -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;
|
size_t method_len = 0, pos;
|
||||||
const char *method;
|
const char *method;
|
||||||
bool bBypass = false, bHaveHost = false, bHostExcluded = false;
|
bool bBypass = false, bHaveHost = false, bHostExcluded = false;
|
||||||
char bRemovedHostSpace = 0;
|
|
||||||
char *pc, Host[256];
|
char *pc, Host[256];
|
||||||
|
|
||||||
DBGPRINT("tamper_out")
|
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)
|
VPRINT("Removing space before host name at pos %zu", pos)
|
||||||
memmove(p - 1, p, *size - pos);
|
memmove(p - 1, p, *size - pos);
|
||||||
(*size)--; // block will shrink by 1 byte
|
(*size)--; // block will shrink by 1 byte
|
||||||
bRemovedHostSpace = 1;
|
|
||||||
}
|
}
|
||||||
if (params.hostcase && HttpFindHost(&pHost,segment,*size))
|
if (params.hostcase && HttpFindHost(&pHost,segment,*size))
|
||||||
{
|
{
|
||||||
|
@ -850,7 +850,6 @@ static bool find_listen_addr(struct sockaddr_storage *salisten, const char *bind
|
|||||||
{
|
{
|
||||||
struct ifaddrs *addrs,*a;
|
struct ifaddrs *addrs,*a;
|
||||||
bool found=false;
|
bool found=false;
|
||||||
bool bindll_want = bindll==prefer || bindll==force;
|
|
||||||
|
|
||||||
if (getifaddrs(&addrs)<0)
|
if (getifaddrs(&addrs)<0)
|
||||||
return false;
|
return false;
|
||||||
|
@ -876,10 +876,7 @@ static bool handle_proxy_mode(tproxy_conn_t *conn, struct tailhead *conn_list)
|
|||||||
break;
|
break;
|
||||||
case S5_ATYP_DOM:
|
case S5_ATYP_DOM:
|
||||||
{
|
{
|
||||||
struct addrinfo *ai,hints;
|
|
||||||
int r;
|
|
||||||
uint16_t port;
|
uint16_t port;
|
||||||
char sport[6];
|
|
||||||
|
|
||||||
if (params.no_resolve)
|
if (params.no_resolve)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user