Skip to content

Commit 557db85

Browse files
committed
Bug#24296291: FIX -WUNUSED-PARAMETER WARNINGS
Patch mysql#18: Fix -Wunused-parameter warnings in clients and plugins.
1 parent d683d25 commit 557db85

22 files changed

+66
-94
lines changed

client/base/abstract_program.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ using std::vector;
2929
extern const char *load_default_groups[];
3030

3131
bool Abstract_program::callback_option_parsed(
32-
int optid,
33-
const struct my_option *opt MY_ATTRIBUTE((unused)),
34-
char *argument)
32+
int, const struct my_option *opt, char *argument)
3533
{
3634
// Check if option uses My::Tools::Base::Options, and it should.
3735
Options::I_option* app_type = (Options::I_option*)opt->app_type;

client/dump/abstract_chain_element.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -73,7 +73,7 @@ Item_processing_data* Abstract_chain_element::new_task_created(
7373
}
7474

7575
Item_processing_data* Abstract_chain_element::new_chain_created(
76-
Chain_data* new_chain_data, Item_processing_data* parent_processing_data,
76+
Chain_data*, Item_processing_data* parent_processing_data,
7777
I_chain_element* child_chain_element)
7878
{
7979
Item_processing_data* new_item_to_process=

client/dump/abstract_mysql_chain_element_extension.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Mysql::Nullable<std::string>
8080
Abstract_mysql_chain_element_extension::get_create_statement(
8181
Mysql::Tools::Base::Mysql_query_runner* runner,
8282
const std::string& database_name, const std::string& object_name,
83-
const std::string& object_type, uint field_id/*= 1*/)
83+
const std::string& object_type, uint)
8484
{
8585
std::vector<const Mysql::Tools::Base::Mysql_query_runner::Row*> result;
8686

client/dump/abstract_progress_watcher.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Abstract_progress_watcher::Abstract_progress_watcher(
7171
m_last_step_countdown(1)
7272
{}
7373

74-
void Abstract_progress_watcher::crawler_completed(I_crawler* crawler)
74+
void Abstract_progress_watcher::crawler_completed(I_crawler*)
7575
{}
7676

7777
void Abstract_progress_watcher::object_processing_ended(
@@ -107,7 +107,7 @@ void Abstract_progress_watcher::object_processing_ended(
107107
}
108108

109109
void Abstract_progress_watcher::object_processing_started(
110-
Item_processing_data* process_data)
110+
Item_processing_data*)
111111
{}
112112

113113
void Abstract_progress_watcher::new_chain_created(

client/dump/mysqldump_tool_chain_maker.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@
3131
using namespace Mysql::Tools::Dump;
3232
using std::placeholders::_1;
3333

34-
void Mysqldump_tool_chain_maker::delete_chain(
35-
uint64 chain_id, I_object_reader* chain)
34+
void Mysqldump_tool_chain_maker::delete_chain(uint64, I_object_reader*)
3635
{}
3736

3837
I_object_reader* Mysqldump_tool_chain_maker::create_chain(
39-
Chain_data* chain_data, I_dump_task* dump_task)
38+
Chain_data*, I_dump_task* dump_task)
4039
{
4140
Table_rows_dump_task* rows_task= dynamic_cast<Table_rows_dump_task*>(
4241
dump_task);

client/dump/single_transaction_connection_provider.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ using namespace Mysql::Tools::Dump;
2424

2525
Mysql::Tools::Base::Mysql_query_runner*
2626
Single_transaction_connection_provider::create_new_runner(
27-
std::function<bool(const Mysql::Tools::Base::Message_data&)>*
28-
message_handler)
27+
std::function<bool(const Mysql::Tools::Base::Message_data&)>*)
2928
{
3029
Mysql::Tools::Base::Mysql_query_runner* runner= NULL;
3130
my_boost::mutex::scoped_lock lock(m_pool_mutex);

client/dump/sql_formatter.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ void Sql_formatter::format_database_start(
264264
this->append_output(database->get_sql_formatted_definition() + ";\n");
265265
}
266266

267-
void Sql_formatter::format_dump_end(Dump_end_dump_task* dump_start_dump_task)
267+
void Sql_formatter::format_dump_end(Dump_end_dump_task*)
268268
{
269269
std::ostringstream out;
270270
std::time_t sys_time = std::chrono::system_clock::to_time_t(

client/dump/standard_progress_watcher.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
2222
using namespace Mysql::Tools::Dump;
2323

2424
void Standard_progress_watcher::process_progress_step(
25-
Abstract_progress_watcher::Progress_data& change)
25+
Abstract_progress_watcher::Progress_data&)
2626
{
2727
std::cerr << "Dump progress: " << m_last_progress.m_table_count << "/"
2828
<< m_total.m_table_count << " tables, " << m_last_progress.m_row_count

client/logger.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
using namespace std;
2525

26-
ostream &operator<<(ostream &os, const Datetime &dt)
26+
ostream &operator<<(ostream &os, const Datetime&)
2727
{
2828
const char format[]= "%Y-%m-%d %X";
2929
time_t t(time(NULL));

client/mysql.cc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,10 +1181,10 @@ static void mysql_end_timer(ulong start_time,char *buff);
11811181
static void nice_time(double sec,char *buff,bool part_second);
11821182
static void kill_query(const char* reason);
11831183
extern "C" void mysql_end(int sig);
1184-
extern "C" void handle_ctrlc_signal(int sig);
1184+
extern "C" void handle_ctrlc_signal(int);
11851185
extern "C" void handle_quit_signal(int sig);
11861186
#if defined(HAVE_TERMIOS_H) && defined(GWINSZ_IN_SYS_IOCTL)
1187-
static void window_resize(int sig);
1187+
static void window_resize(int);
11881188
#endif
11891189

11901190
const char DELIMITER_NAME[]= "delimiter";
@@ -1541,11 +1541,9 @@ void mysql_end(int sig)
15411541
This function handles SIGINT (Ctrl - C). It sends a 'KILL [QUERY]' command
15421542
to the server if a query is currently executing. On Windows, 'Ctrl - Break'
15431543
is treated alike.
1544-
1545-
@param sig Signal number
15461544
*/
15471545

1548-
void handle_ctrlc_signal(int sig)
1546+
void handle_ctrlc_signal(int)
15491547
{
15501548
sigint_received= 1;
15511549

@@ -1638,7 +1636,7 @@ void kill_query(const char *reason)
16381636

16391637

16401638
#if defined(HAVE_TERMIOS_H) && defined(GWINSZ_IN_SYS_IOCTL)
1641-
void window_resize(int sig)
1639+
void window_resize(int)
16421640
{
16431641
struct winsize window_size;
16441642

0 commit comments

Comments
 (0)