From 64ee0ad9e3fdeb25afae959e7faa4227008e92af Mon Sep 17 00:00:00 2001 From: Andrea Bittau Date: Mon, 7 Mar 2016 00:55:25 +0900 Subject: [PATCH] take care of compiler warnings --- src/crypto_reg.c | 18 ------------------ src/tcpcrypt.c | 8 ++------ 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/src/crypto_reg.c b/src/crypto_reg.c index 831452f..4fdbb01 100644 --- a/src/crypto_reg.c +++ b/src/crypto_reg.c @@ -15,24 +15,6 @@ #include "crypto.h" #include "profile.h" -static struct crypt_pub *RSA_HKDF_new(void) -{ - struct crypt_pub *cp = xmalloc(sizeof(*cp)); - - memset(cp, 0, sizeof(*cp)); - - cp->cp_hkdf = crypt_HKDF_SHA256_new(); - cp->cp_pub = crypt_RSA_new(); - cp->cp_n_c = 32; - cp->cp_n_s = 48; - cp->cp_k_len = 32; - cp->cp_min_key = (2048 / 8); - cp->cp_max_key = (4096 / 8); - cp->cp_cipher_len = (4096 / 8); - - return cp; -} - static struct crypt_pub *ECDHE_HKDF_new(struct crypt*(*ctr)(void), int klen) { struct crypt_pub *cp = xmalloc(sizeof(*cp)); diff --git a/src/tcpcrypt.c b/src/tcpcrypt.c index 64038a4..aed6e1c 100644 --- a/src/tcpcrypt.c +++ b/src/tcpcrypt.c @@ -3145,7 +3145,6 @@ static void rdr_process_init(struct tc *tc) int len; struct ip *ip = (struct ip *) buf; struct tcphdr *tcp = (struct tcphdr*) (ip + 1); - int rc; struct fd *fd = tc->tc_rdr_fd; struct tc_init1 *i1 = (struct tc_init1*) &buf[headroom]; int rem = sizeof(buf) - headroom; @@ -3188,8 +3187,7 @@ static void rdr_process_init(struct tc *tc) switch (tc->tc_state) { /* outbound connections */ case STATE_INIT1_SENT: - rc = do_input_init1_sent(tc, ip, tcp); - + do_input_init1_sent(tc, ip, tcp); rdr_handshake_complete(tc); break; @@ -3484,11 +3482,9 @@ static int rdr_syn_ack(struct tc *tc, struct ip *ip, struct tcphdr *tcp) static int rdr_ack(struct tc *tc, struct ip *ip, struct tcphdr *tcp) { - int rc; - /* send init1 */ if (tc->tc_state == STATE_PKCONF_RCVD) { - rc = do_output_pkconf_rcvd(tc, ip, tcp, 0); + do_output_pkconf_rcvd(tc, ip, tcp, 0); if (send(tc->tc_rdr_fd->fd_fd, tc->tc_rdr_buf, tc->tc_rdr_len, 0) != tc->tc_rdr_len) {