From 81ebfef91777bc762c07baa72332dabdc33ae23d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Mon, 29 Nov 2021 16:12:21 +0100 Subject: [PATCH] Removed unused 'cmnt_type_1_st' parameter for 'process_cmnt_type_3' and 'process_cmnt_type_2' --- lib/c_tokenizer.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/c_tokenizer.c b/lib/c_tokenizer.c index eb32261b1..da957d4fd 100644 --- a/lib/c_tokenizer.c +++ b/lib/c_tokenizer.c @@ -1259,14 +1259,13 @@ enum p_st process_cmnt_type_1(shared_st* shared_st, cmnt_type_1_st* c_t_1_st, ch * by char until finding the delimiter. * * @param shared_st Shared state used to continue the query processing. - * @param c_t_1_st TODO: Remove, unused. * * @return The next processing state, it could be either: * - 'st_cmnt_type_2' if the comment hasn't yet completed to be parsed. * - 'st_no_mark_found' if the comment has completed to be parsed. */ static __attribute__((always_inline)) inline -enum p_st process_cmnt_type_2(shared_st* shared_st, cmnt_type_1_st* c_t_1_st) { +enum p_st process_cmnt_type_2(shared_st* shared_st) { enum p_st next_state = st_cmnt_type_2; // discard processed "#" @@ -1292,14 +1291,13 @@ enum p_st process_cmnt_type_2(shared_st* shared_st, cmnt_type_1_st* c_t_1_st) { * by char until finding the delimiter. * * @param shared_st Shared state used to continue the query processing. - * @param c_t_1_st TODO: Remove, unused. * * @return The next processing state, it could be either: * - 'st_cmnt_type_3' if the comment hasn't yet completed to be parsed. * - 'st_no_mark_found' if the comment has completed to be parsed. */ static __attribute__((always_inline)) inline -enum p_st process_cmnt_type_3(shared_st* shared_st, cmnt_type_1_st* c_t_1_st) { +enum p_st process_cmnt_type_3(shared_st* shared_st) { enum p_st next_state = st_cmnt_type_3; // discard processed "-- " @@ -1752,14 +1750,14 @@ void stage_1_parsing(shared_st* shared_st, stage_1_st* stage_1_st, options* opts } } else if (cur_st == st_cmnt_type_2) { shared_st->copy_next_char = 0; - cur_st = process_cmnt_type_2(shared_st, cmnt_type_1_st); + cur_st = process_cmnt_type_2(shared_st); if (cur_st == st_no_mark_found) { shared_st->copy_next_char = 1; continue; } } else if (cur_st == st_cmnt_type_3) { shared_st->copy_next_char = 0; - cur_st = process_cmnt_type_3(shared_st, cmnt_type_1_st); + cur_st = process_cmnt_type_3(shared_st); if (cur_st == st_no_mark_found) { shared_st->copy_next_char = 1; continue; @@ -2893,14 +2891,14 @@ char* mysql_query_digest_and_first_comment_one_it(char* q, int q_len, char** fst } } else if (cur_st == st_cmnt_type_2) { shared_st.copy_next_char = 0; - cur_st = process_cmnt_type_2(&shared_st, &c_t_1_st); + cur_st = process_cmnt_type_2(&shared_st); if (cur_st == st_no_mark_found) { shared_st.copy_next_char = 1; continue; } } else if (cur_st == st_cmnt_type_3) { shared_st.copy_next_char = 0; - cur_st = process_cmnt_type_3(&shared_st, &c_t_1_st); + cur_st = process_cmnt_type_3(&shared_st); if (cur_st == st_no_mark_found) { shared_st.copy_next_char = 1; continue;