Skip to content

Commit cec81c0

Browse files
committed
Bug#24296291: FIX -WUNUSED-PARAMETER WARNINGS
Patch #7: Fix -Wunused-parameter warnings in field/item code.
1 parent 948bd70 commit cec81c0

34 files changed

+292
-321
lines changed

sql/dd_sql_view.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ class View_metadata_updater_context
129129
class View_metadata_updater_error_handler final : public Internal_error_handler
130130
{
131131
public:
132-
virtual bool handle_condition(THD *thd,
132+
virtual bool handle_condition(THD*,
133133
uint sql_errno,
134-
const char *sqlstate,
135-
Sql_condition::enum_severity_level *level,
136-
const char *msg)
134+
const char*,
135+
Sql_condition::enum_severity_level*,
136+
const char*)
137137
{
138138
bool retval= true;
139139

sql/dd_table_share.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,8 +1202,7 @@ static void fill_index_element_from_dd(TABLE_SHARE *share,
12021202
/** Fill KEY::key_part array according to metadata from dd::Index object. */
12031203
static void fill_index_elements_from_dd(TABLE_SHARE *share,
12041204
const dd::Index *idx_obj,
1205-
int key_nr,
1206-
bool use_extended_sk)
1205+
int key_nr)
12071206
{
12081207
//
12091208
// Iterate through all index elements
@@ -1517,8 +1516,7 @@ static bool fill_indexes_from_dd(TABLE_SHARE *share, const dd::Table *tab_obj)
15171516

15181517
fill_index_elements_from_dd(share,
15191518
index_at_pos[key_nr],
1520-
key_nr,
1521-
use_extended_sk);
1519+
key_nr);
15221520

15231521
key_part+=keyinfo->user_defined_key_parts;
15241522
rec_per_key+=keyinfo->user_defined_key_parts;

sql/error_handler.cc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
4141
@return true if the condition is handled.
4242
*/
43-
bool Drop_table_error_handler::handle_condition(THD *thd,
43+
bool Drop_table_error_handler::handle_condition(THD*,
4444
uint sql_errno,
45-
const char* sqlstate,
46-
Sql_condition::enum_severity_level *level,
47-
const char* msg)
45+
const char*,
46+
Sql_condition::enum_severity_level*,
47+
const char*)
4848
{
4949
return (sql_errno == EE_DELETE && my_errno() == ENOENT);
5050
}
@@ -60,9 +60,9 @@ bool Drop_table_error_handler::handle_condition(THD *thd,
6060
*/
6161
bool Ignore_error_handler::handle_condition(THD *thd,
6262
uint sql_errno,
63-
const char *sqlstate,
63+
const char*,
6464
Sql_condition::enum_severity_level *level,
65-
const char *msg)
65+
const char*)
6666
{
6767
/*
6868
If a statement is executed with IGNORE keyword then this handler
@@ -108,8 +108,8 @@ bool View_error_handler::handle_condition(
108108
THD *thd,
109109
uint sql_errno,
110110
const char *,
111-
Sql_condition::enum_severity_level *level,
112-
const char *message)
111+
Sql_condition::enum_severity_level*,
112+
const char*)
113113
{
114114
/*
115115
Error will be handled by Show_create_error_handler for
@@ -153,9 +153,9 @@ bool View_error_handler::handle_condition(
153153
*/
154154
bool Strict_error_handler::handle_condition(THD *thd,
155155
uint sql_errno,
156-
const char *sqlstate,
156+
const char*,
157157
Sql_condition::enum_severity_level *level,
158-
const char *msg)
158+
const char*)
159159
{
160160
/*
161161
STRICT error handler should not be effective if we have changed the
@@ -244,11 +244,11 @@ class Repair_mrg_table_error_handler : public Internal_error_handler
244244
: m_handled_errors(false), m_unhandled_errors(false)
245245
{}
246246

247-
virtual bool handle_condition(THD *thd,
247+
virtual bool handle_condition(THD*,
248248
uint sql_errno,
249-
const char* sqlstate,
250-
Sql_condition::enum_severity_level *level,
251-
const char* msg)
249+
const char*,
250+
Sql_condition::enum_severity_level*,
251+
const char*)
252252
{
253253
if (sql_errno == ER_NO_SUCH_TABLE || sql_errno == ER_WRONG_MRG_TABLE)
254254
{

sql/error_handler.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ class Internal_error_handler
8888
class Dummy_error_handler : public Internal_error_handler
8989
{
9090
public:
91-
virtual bool handle_condition(THD *thd,
92-
uint sql_errno,
93-
const char* sqlstate,
94-
Sql_condition::enum_severity_level *level,
95-
const char* msg)
91+
virtual bool handle_condition(THD*,
92+
uint,
93+
const char*,
94+
Sql_condition::enum_severity_level*,
95+
const char*)
9696
{
9797
/* Ignore error */
9898
return true;
@@ -127,11 +127,11 @@ class Drop_table_error_handler : public Internal_error_handler
127127
class MDL_deadlock_and_lock_abort_error_handler: public Internal_error_handler
128128
{
129129
public:
130-
virtual bool handle_condition(THD *thd,
130+
virtual bool handle_condition(THD*,
131131
uint sql_errno,
132-
const char *sqlstate,
133-
Sql_condition::enum_severity_level *level,
134-
const char* msg)
132+
const char*,
133+
Sql_condition::enum_severity_level*,
134+
const char*)
135135
{
136136
if (sql_errno == ER_LOCK_ABORTED || sql_errno == ER_LOCK_DEADLOCK)
137137
m_need_reopen= true;
@@ -191,11 +191,11 @@ class No_such_table_error_handler : public Internal_error_handler
191191
: m_handled_errors(0), m_unhandled_errors(0)
192192
{}
193193

194-
virtual bool handle_condition(THD *thd,
194+
virtual bool handle_condition(THD*,
195195
uint sql_errno,
196-
const char* sqlstate,
197-
Sql_condition::enum_severity_level *level,
198-
const char* msg)
196+
const char*,
197+
Sql_condition::enum_severity_level*,
198+
const char*)
199199
{
200200
if (sql_errno == ER_NO_SUCH_TABLE)
201201
{
@@ -294,11 +294,11 @@ class Strict_error_handler : public Internal_error_handler
294294
class Tablespace_name_error_handler : public Internal_error_handler
295295
{
296296
public:
297-
bool handle_condition(THD *thd,
297+
bool handle_condition(THD*,
298298
uint sql_errno,
299-
const char *sqlstate,
300-
Sql_condition::enum_severity_level *level,
301-
const char *msg)
299+
const char*,
300+
Sql_condition::enum_severity_level*,
301+
const char*)
302302
{
303303
return (sql_errno == ER_WRONG_TABLESPACE_NAME ||
304304
sql_errno == ER_TOO_LONG_IDENT);

0 commit comments

Comments
 (0)