Remove definitions of unused variables

This commit is contained in:
William Robinet 2020-10-06 10:20:16 +02:00
parent 97f6623e71
commit 67de5d014d
6 changed files with 5 additions and 17 deletions

View file

@ -180,8 +180,7 @@ int clean_old_conn() {
} }
int destroy_all_conn() { int destroy_all_conn() {
conn_struct *conn; int i = 0;
int i = 0,r;
while(first_conn) { while(first_conn) {
i++; i++;
tcp_destroy_conn(&first_conn->conn); tcp_destroy_conn(&first_conn->conn);

View file

@ -146,11 +146,8 @@ int process_tcp_packet(handler,ctx,p)
case TCP_STATE_ESTABLISHED: case TCP_STATE_ESTABLISHED:
case TCP_STATE_FIN1: case TCP_STATE_FIN1:
{ {
UINT4 length;
if(p->tcp->th_flags & TH_SYN) if(p->tcp->th_flags & TH_SYN)
break; break;
length=p->len - (p->tcp->th_off * 4);
if((r=process_data_segment(conn,handler,p,stream,direction))) if((r=process_data_segment(conn,handler,p,stream,direction)))
ABORT(r); ABORT(r);
} }

View file

@ -538,9 +538,7 @@ static int print_ssl_header(obj,direction,q,data,len)
int len; int len;
{ {
int ct=0; int ct=0;
int r;
segment *s; segment *s;
struct timeval dt;
ssl_print_record_num(obj); ssl_print_record_num(obj);

View file

@ -203,7 +203,7 @@ int ssl_decode_rec_data(ssl,d,ct,version,in,inl,out,outl)
#ifdef OPENSSL #ifdef OPENSSL
int pad; int pad;
int r,encpadl,x; int r,encpadl,x;
UCHAR *mac,*iv,aead_tag[13],aead_nonce[12]; UCHAR *mac,aead_tag[13],aead_nonce[12];
CRDUMP("Ciphertext",in,inl); CRDUMP("Ciphertext",in,inl);
if(IS_AEAD_CIPHER(d->cs)){ if(IS_AEAD_CIPHER(d->cs)){

View file

@ -141,7 +141,7 @@ int ssl_decode_ctx_create(dp,keyfile,pass,keylogfile)
{ {
#ifdef OPENSSL #ifdef OPENSSL
ssl_decode_ctx *d=0; ssl_decode_ctx *d=0;
int r,_status; int _status;
SSL_library_init(); SSL_library_init();
OpenSSL_add_all_algorithms(); OpenSSL_add_all_algorithms();
@ -477,7 +477,7 @@ static int ssl_create_session_lookup_key(ssl,id,idlen,keyp,keyl)
{ {
UCHAR *key=0; UCHAR *key=0;
UINT4 l; UINT4 l;
int r,_status; int _status;
l=idlen+strlen(ssl->server_name)+idlen+15; /* HOST + PORT + id */ l=idlen+strlen(ssl->server_name)+idlen+15; /* HOST + PORT + id */
@ -550,7 +550,6 @@ int ssl_save_session(ssl,d)
{ {
#ifdef OPENSSL #ifdef OPENSSL
UCHAR *lookup_key=0; UCHAR *lookup_key=0;
void *msv;
Data *msd=0; Data *msd=0;
int lookup_key_len; int lookup_key_len;
int r,_status; int r,_status;
@ -960,7 +959,6 @@ static int ssl_generate_keying_material(ssl,d)
if(ssl->cs->export){ if(ssl->cs->export){
Data iv_c,iv_s; Data iv_c,iv_s;
Data c_iv_d,s_iv_d;
Data key_c,key_s; Data key_c,key_s;
Data k; Data k;
@ -1114,7 +1112,7 @@ static int ssl_generate_session_hash(ssl,d)
static int ssl_read_key_log_file(d) static int ssl_read_key_log_file(d)
ssl_decoder *d; ssl_decoder *d;
{ {
int r,_status,dgi,n,i; int r,_status,n,i;
unsigned int t; unsigned int t;
size_t l=0; size_t l=0;
char *line,*label_data; char *line,*label_data;

View file

@ -65,8 +65,6 @@ int process_beginning_plaintext(ssl,seg,direction)
int direction; int direction;
{ {
Data d; Data d;
int r;
struct timeval dt;
if(seg->len==0) if(seg->len==0)
return(SSL_NO_DATA); return(SSL_NO_DATA);
@ -102,7 +100,6 @@ int process_v2_hello(ssl,seg)
Data d; Data d;
Data chall; Data chall;
char random[32]; char random[32];
struct timeval dt;
if(seg->len==0) if(seg->len==0)
return(SSL_NO_DATA); return(SSL_NO_DATA);
@ -157,7 +154,6 @@ int process_v2_hello(ssl,seg)
for(;cs_len;cs_len-=3){ for(;cs_len;cs_len-=3){
UINT4 val; UINT4 val;
char *str;
SSL_DECODE_UINT24(ssl,0,0,&d,&val); SSL_DECODE_UINT24(ssl,0,0,&d,&val);
ssl_print_cipher_suite(ssl,ver,P_HL,val); ssl_print_cipher_suite(ssl,ver,P_HL,val);