Skip to content

Commit 30ff18b

Browse files
committed
Bug#24296291: FIX -WUNUSED-PARAMETER WARNINGS
Patch #16: Fix -Wunused-parameter warnings in plugins, part 2.
1 parent 3e8e3bd commit 30ff18b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+209
-215
lines changed

plugin/version_token/version_token.cc

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static MYSQL_THDVAR_ULONG(session_number,
129129

130130

131131
static void update_session_version_tokens(MYSQL_THD thd,
132-
struct st_mysql_sys_var *var,
132+
struct st_mysql_sys_var*,
133133
void *var_ptr, const void *save)
134134
{
135135
THDVAR(thd, session_number)= 0;
@@ -703,8 +703,8 @@ static bool is_hash_inited(const char *function, char *error)
703703
VERSION_TOKENS_SET(tokens_list varchar)
704704
*/
705705

706-
PLUGIN_EXPORT bool version_tokens_set_init(UDF_INIT* initid, UDF_ARGS* args,
707-
char* message)
706+
PLUGIN_EXPORT bool version_tokens_set_init(UDF_INIT*, UDF_ARGS* args,
707+
char* message)
708708
{
709709
THD *thd= current_thd;
710710

@@ -729,9 +729,9 @@ PLUGIN_EXPORT bool version_tokens_set_init(UDF_INIT* initid, UDF_ARGS* args,
729729
return false;
730730
}
731731

732-
PLUGIN_EXPORT char *version_tokens_set(UDF_INIT *initid, UDF_ARGS *args,
732+
PLUGIN_EXPORT char *version_tokens_set(UDF_INIT*, UDF_ARGS *args,
733733
char *result, unsigned long *length,
734-
char *null_value, char *error)
734+
char*, char *error)
735735
{
736736
char *hash_str;
737737
int len= args->lengths[0];
@@ -797,8 +797,8 @@ PLUGIN_EXPORT char *version_tokens_set(UDF_INIT *initid, UDF_ARGS *args,
797797
VERSION_TOKENS_EDIT(tokens_list varchar)
798798
*/
799799

800-
PLUGIN_EXPORT bool version_tokens_edit_init(UDF_INIT *initid, UDF_ARGS *args,
801-
char *message)
800+
PLUGIN_EXPORT bool version_tokens_edit_init(UDF_INIT*, UDF_ARGS *args,
801+
char *message)
802802
{
803803
THD *thd= current_thd;
804804

@@ -823,9 +823,9 @@ PLUGIN_EXPORT bool version_tokens_edit_init(UDF_INIT *initid, UDF_ARGS *args,
823823
return false;
824824
}
825825

826-
PLUGIN_EXPORT char *version_tokens_edit(UDF_INIT *initid, UDF_ARGS *args,
826+
PLUGIN_EXPORT char *version_tokens_edit(UDF_INIT*, UDF_ARGS *args,
827827
char *result, unsigned long *length,
828-
char *null_value, char *error)
828+
char*, char *error)
829829
{
830830
char *hash_str;
831831
int len= args->lengths[0];
@@ -881,8 +881,8 @@ PLUGIN_EXPORT char *version_tokens_edit(UDF_INIT *initid, UDF_ARGS *args,
881881
VERSION_TOKENS_DELETE(tokens_list varchar)
882882
*/
883883

884-
PLUGIN_EXPORT bool version_tokens_delete_init(UDF_INIT *initid,
885-
UDF_ARGS *args, char *message)
884+
PLUGIN_EXPORT bool version_tokens_delete_init(UDF_INIT*,
885+
UDF_ARGS *args, char *message)
886886
{
887887
THD *thd= current_thd;
888888

@@ -907,9 +907,9 @@ PLUGIN_EXPORT bool version_tokens_delete_init(UDF_INIT *initid,
907907
return false;
908908
}
909909

910-
PLUGIN_EXPORT char *version_tokens_delete(UDF_INIT *initid, UDF_ARGS *args,
910+
PLUGIN_EXPORT char *version_tokens_delete(UDF_INIT*, UDF_ARGS *args,
911911
char *result, unsigned long *length,
912-
char *null_value, char *error)
912+
char*, char *error)
913913
{
914914
const char *arg= args->args[0];
915915
std::stringstream ss;
@@ -1070,9 +1070,9 @@ PLUGIN_EXPORT void version_tokens_show_deinit(UDF_INIT *initid)
10701070
my_free(initid->ptr);
10711071
}
10721072

1073-
PLUGIN_EXPORT char *version_tokens_show(UDF_INIT *initid, UDF_ARGS *args,
1074-
char *result, unsigned long *length,
1075-
char *null_value, char *error)
1073+
PLUGIN_EXPORT char *version_tokens_show(UDF_INIT *initid, UDF_ARGS*,
1074+
char*, unsigned long *length,
1075+
char*, char*)
10761076
{
10771077
char *result_str= initid->ptr;
10781078
*length= 0;
@@ -1137,8 +1137,8 @@ PLUGIN_EXPORT bool version_tokens_lock_shared_init(
11371137
}
11381138

11391139

1140-
PLUGIN_EXPORT long long version_tokens_lock_shared(
1141-
UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
1140+
PLUGIN_EXPORT long long version_tokens_lock_shared(UDF_INIT*, UDF_ARGS *args,
1141+
char*, char *error)
11421142
{
11431143
long long timeout=
11441144
args->args[args->arg_count - 1] ? // Null ?
@@ -1166,8 +1166,8 @@ PLUGIN_EXPORT bool version_tokens_lock_exclusive_init(
11661166
}
11671167

11681168

1169-
PLUGIN_EXPORT long long version_tokens_lock_exclusive(
1170-
UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
1169+
PLUGIN_EXPORT long long version_tokens_lock_exclusive(UDF_INIT*, UDF_ARGS *args,
1170+
char*, char *error)
11711171
{
11721172
long long timeout=
11731173
args->args[args->arg_count - 1] ? // Null ?
@@ -1187,8 +1187,8 @@ PLUGIN_EXPORT long long version_tokens_lock_exclusive(
11871187
LOCKING_SERVICE_WRITE, (unsigned long) timeout);
11881188
}
11891189

1190-
PLUGIN_EXPORT bool version_tokens_unlock_init(
1191-
UDF_INIT *initid, UDF_ARGS *args, char *message)
1190+
PLUGIN_EXPORT bool version_tokens_unlock_init(UDF_INIT*, UDF_ARGS *args,
1191+
char *message)
11921192
{
11931193
THD *thd= current_thd;
11941194

@@ -1208,8 +1208,8 @@ PLUGIN_EXPORT bool version_tokens_unlock_init(
12081208
}
12091209

12101210

1211-
long long version_tokens_unlock(UDF_INIT *initid, UDF_ARGS *args,
1212-
char *is_null, char *error)
1211+
long long version_tokens_unlock(UDF_INIT*, UDF_ARGS*,
1212+
char*, char*)
12131213
{
12141214
// For the UDF 1 == success, 0 == failure.
12151215
return !release_locking_service_locks(NULL, VTOKEN_LOCKS_NAMESPACE);

rapid/plugin/group_replication/include/certifier.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ class Gtid_Executed_Message: public Plugin_gcs_message
764764
Implementation of the template methods of Gcs_plugin_message
765765
*/
766766
void encode_payload(std::vector<unsigned char>* buffer) const;
767-
void decode_payload(const unsigned char* buffer, const unsigned char* end);
767+
void decode_payload(const unsigned char* buffer, const unsigned char*);
768768

769769
private:
770770
std::vector<uchar> data;

rapid/plugin/group_replication/include/gcs_event_handlers.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -190,12 +190,10 @@ class Plugin_gcs_events_handler: public Gcs_communication_event_listener,
190190
This method takes all the group executed sets and adds those belonging to
191191
non recovering member to the view change packet
192192
193-
@param[in] joining_members the joining members for this view
194193
@param[in] view_packet the view change packet
195194
*/
196195
void
197-
collect_members_executed_sets(const std::vector<Gcs_member_identifier> &joining_members,
198-
View_change_packet *view_packet) const;
196+
collect_members_executed_sets(View_change_packet *view_packet) const;
199197

200198
/**
201199
Method that compares the member options with

rapid/plugin/group_replication/include/member_info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class Group_member_info: public Plugin_gcs_message
334334

335335
protected:
336336
void encode_payload(std::vector<unsigned char>* buffer) const;
337-
void decode_payload(const unsigned char* buffer, const unsigned char* end);
337+
void decode_payload(const unsigned char* buffer, const unsigned char*);
338338

339339
private:
340340
std::string hostname;

rapid/plugin/group_replication/include/observer_trans.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Transaction_Message: public Plugin_gcs_message
8989
Implementation of the template methods
9090
*/
9191
void encode_payload(std::vector<unsigned char>* buffer) const;
92-
void decode_payload(const unsigned char* buffer, const unsigned char* length);
92+
void decode_payload(const unsigned char* buffer, const unsigned char*);
9393

9494
private:
9595
std::vector<uchar> data;

rapid/plugin/group_replication/include/pipeline_stats.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,8 @@ class Pipeline_stats_member_message : public Plugin_gcs_message
152152
Message decoding method
153153
154154
@param[in] buffer the received data
155-
@param[in] end the end of the buffer
156155
*/
157-
void decode_payload(const unsigned char *buffer, const unsigned char* end);
156+
void decode_payload(const unsigned char *buffer, const unsigned char*);
158157

159158
private:
160159
int32 m_transactions_waiting_certification;

rapid/plugin/group_replication/include/ps_information.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -29,15 +29,13 @@ bool get_group_members_info(uint index,
2929
const GROUP_REPLICATION_GROUP_MEMBERS_CALLBACKS& callbacks,
3030
Group_member_info_manager_interface
3131
*group_member_manager,
32-
char *group_name_pointer,
3332
char *channel_name);
3433

3534
bool get_group_member_stats(const GROUP_REPLICATION_GROUP_MEMBER_STATS_CALLBACKS& callbacks,
3635
Group_member_info_manager_interface
3736
*group_member_manager,
3837
Applier_module *applier_module,
3938
Gcs_operations *gcs_module,
40-
char *group_name_pointer,
4139
char *channel_name);
4240

4341
bool get_connection_status(const GROUP_REPLICATION_CONNECTION_STATUS_CALLBACKS& callbacks,

rapid/plugin/group_replication/include/recovery_message.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,8 @@ class Recovery_message : public Plugin_gcs_message
101101
Message decoding method
102102
103103
@param[in] buffer the received data
104-
@param[in] end the end of the buffer
105104
*/
106-
void decode_payload(const unsigned char* buffer, const unsigned char* end);
105+
void decode_payload(const unsigned char* buffer, const unsigned char*);
107106

108107
private:
109108
/**The message type*/

rapid/plugin/group_replication/include/single_primary_message.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,9 @@ class Single_primary_message : public Plugin_gcs_message
9191
Message decoding method
9292
9393
@param[in] buffer the received data
94-
@param[in] end the end of buffer
9594
*/
9695
void decode_payload(const unsigned char* buffer,
97-
const unsigned char* end);
96+
const unsigned char*);
9897

9998
private:
10099
/**The message type*/

rapid/plugin/group_replication/src/applier_channel_state_observer.cc

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -20,13 +20,12 @@ Applier_channel_state_observer::
2020
Applier_channel_state_observer()
2121
{}
2222

23-
int Applier_channel_state_observer::
24-
thread_start(Binlog_relay_IO_param *param)
23+
int Applier_channel_state_observer::thread_start(Binlog_relay_IO_param*)
2524
{
2625
return 0;
2726
}
2827

29-
int Applier_channel_state_observer::thread_stop(Binlog_relay_IO_param *param)
28+
int Applier_channel_state_observer::thread_stop(Binlog_relay_IO_param*)
3029
{
3130
return 0;
3231
}
@@ -39,32 +38,32 @@ applier_stop(Binlog_relay_IO_param *param, bool aborted)
3938
}
4039

4140
int Applier_channel_state_observer::
42-
before_request_transmit(Binlog_relay_IO_param *param,
43-
uint32 flags)
41+
before_request_transmit(Binlog_relay_IO_param*,
42+
uint32)
4443
{
4544
return 0;
4645
}
4746

4847
int Applier_channel_state_observer::
49-
after_read_event(Binlog_relay_IO_param *param,
50-
const char *packet, unsigned long len,
51-
const char **event_buf,
52-
unsigned long *event_len)
48+
after_read_event(Binlog_relay_IO_param*,
49+
const char*, unsigned long,
50+
const char**,
51+
unsigned long*)
5352
{
5453
return 0;
5554
}
5655

5756
int Applier_channel_state_observer::
58-
after_queue_event(Binlog_relay_IO_param *param,
59-
const char *event_buf,
60-
unsigned long event_len,
61-
uint32 flags)
57+
after_queue_event(Binlog_relay_IO_param*,
58+
const char*,
59+
unsigned long,
60+
uint32)
6261
{
6362
return 0;
6463
}
6564

6665
int Applier_channel_state_observer::
67-
after_reset_slave(Binlog_relay_IO_param *param)
66+
after_reset_slave(Binlog_relay_IO_param*)
6867
{
6968
return 0;
7069
}

rapid/plugin/group_replication/src/certifier.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,7 @@ Gtid_Executed_Message::encode_payload(std::vector<unsigned char>* buffer) const
17401740

17411741
void
17421742
Gtid_Executed_Message::decode_payload(const unsigned char* buffer,
1743-
const unsigned char* length)
1743+
const unsigned char*)
17441744
{
17451745
DBUG_ENTER("Gtid_Executed_Message::decode_payload");
17461746
const unsigned char *slider= buffer;

rapid/plugin/group_replication/src/gcs_event_handlers.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ void Plugin_gcs_events_handler::handle_joining_members(const Gcs_view& new_view,
777777

778778
std::string view_id= new_view.get_view_id().get_representation();
779779
View_change_packet * view_change_packet= new View_change_packet(view_id);
780-
collect_members_executed_sets(new_view.get_joined_members(), view_change_packet);
780+
collect_members_executed_sets(view_change_packet);
781781
applier_module->add_view_change_packet(view_change_packet);
782782
}
783783
}
@@ -1269,8 +1269,7 @@ int Plugin_gcs_events_handler::compare_member_transaction_sets() const
12691269
}
12701270

12711271
void Plugin_gcs_events_handler::
1272-
collect_members_executed_sets(const vector<Gcs_member_identifier> &joining_members,
1273-
View_change_packet *view_packet) const
1272+
collect_members_executed_sets(View_change_packet *view_packet) const
12741273
{
12751274
std::vector<Group_member_info*> *all_members= group_member_mgr->get_all_members();
12761275
std::vector<Group_member_info*>::iterator all_members_it;

rapid/plugin/group_replication/src/member_info.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ Group_member_info_manager_message::encode_payload(std::vector<unsigned char>* bu
842842

843843
void
844844
Group_member_info_manager_message::decode_payload(const unsigned char* buffer,
845-
const unsigned char* end)
845+
const unsigned char*)
846846
{
847847
DBUG_ENTER("Group_member_info_manager_message::decode_payload");
848848
const unsigned char *slider= buffer;

0 commit comments

Comments
 (0)