Skip to content

Commit a77f492

Browse files
committed
Fix compilation problems
1 parent f92e4b5 commit a77f492

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

protocol.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ change_clt_auth_content(unsigned char *payload, int length,
200200
q = p;
201201
p = p + 23;
202202
len = p - payload;
203-
if (len > length) {
203+
if ((int) len > length) {
204204
tc_log_info(LOG_ERR, 0, "payload len is too short:%d,%u", length, len);
205205
return 0;
206206
}
@@ -238,7 +238,7 @@ change_clt_auth_content(unsigned char *payload, int length,
238238
/* skip scramble_buff length */
239239
p = p + 1;
240240
len = p - payload + SCRAMBLE_LENGTH;
241-
if (len > length) {
241+
if ((int) len > length) {
242242
tc_log_info(LOG_ERR, 0, "payload len is too short too:%d,%u",
243243
length, len);
244244
return 0;

tc_mysql_module.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ mysql_dispose_auth(tc_sess_t *s, tc_iph_t *ip, tc_tcph_t *tcp)
249249
static int
250250
prepare_for_renew_session(tc_sess_t *s, tc_iph_t *ip, tc_tcph_t *tcp)
251251
{
252-
uint16_t size_ip, t_cont_len, fir_clen, sec_clen;
252+
uint16_t size_ip, fir_clen, sec_clen;
253253
uint32_t tot_clen, base_seq;
254254
uint64_t key;
255255
tc_iph_t *fir_ip, *t_ip, *sec_ip;
@@ -323,7 +323,6 @@ prepare_for_renew_session(tc_sess_t *s, tc_iph_t *ip, tc_tcph_t *tcp)
323323
static int
324324
proc_when_sess_created(tc_sess_t *s, tc_iph_t *ip, tc_tcph_t *tcp)
325325
{
326-
uint64_t key;
327326
tc_mysql_session *data;
328327

329328
data = (tc_mysql_session *) tc_pcalloc(s->pool, sizeof(tc_mysql_session));
@@ -392,9 +391,6 @@ check_needed_for_sec_auth(tc_sess_t *s, tc_iph_t *ip, tc_tcph_t *tcp)
392391
static int
393392
proc_auth(tc_sess_t *s, tc_iph_t *ip, tc_tcph_t *tcp)
394393
{
395-
uint16_t size_tcp;
396-
unsigned char *p, *payload, pack_number;
397-
398394
if (!s->sm.rcv_rep_greet) {
399395
return PACK_STOP;
400396
}

0 commit comments

Comments
 (0)