Skip to content

Commit 87374d4

Browse files
committed
Bug#24296291: FIX -WUNUSED-PARAMETER WARNINGS
Patch #5: Fix -Wunused-parameter warnings in Replication
1 parent 4e3b40a commit 87374d4

Some content is hidden

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

47 files changed

+275
-325
lines changed

libbinlogevents/include/binlog_event.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -795,10 +795,8 @@ class Binary_log_event
795795
796796
@param buf Contains the serialized event
797797
@param binlog_version The binary log format version
798-
@param server_version The MySQL server's version
799798
*/
800-
Binary_log_event(const char **buf, uint16_t binlog_version,
801-
const char *server_version);
799+
Binary_log_event(const char **buf, uint16_t binlog_version);
802800
public:
803801
#ifndef HAVE_MYSYS
804802
/*

libbinlogevents/include/control_events.h

+3-6
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,7 @@ class Stop_event: public Binary_log_event
465465
*/
466466
Stop_event(const char* buf,
467467
const Format_description_event *description_event)
468-
:Binary_log_event(&buf, description_event->binlog_version,
469-
description_event->server_version)
468+
:Binary_log_event(&buf, description_event->binlog_version)
470469
{}
471470

472471
#ifndef HAVE_MYSYS
@@ -1201,7 +1200,6 @@ class Transaction_context_event : public Binary_log_event
12011200
</pre>
12021201
12031202
@param buffer Contains the serialized event.
1204-
@param event_len Length of the serialized event.
12051203
@param description_event An FDE event, used to get the
12061204
following information
12071205
-binlog_version
@@ -1211,7 +1209,7 @@ class Transaction_context_event : public Binary_log_event
12111209
The content of this object
12121210
depends on the binlog-version currently in use.
12131211
*/
1214-
Transaction_context_event(const char *buffer, unsigned int event_len,
1212+
Transaction_context_event(const char *buffer,
12151213
const Format_description_event *description_event);
12161214

12171215
Transaction_context_event(unsigned int thread_id_arg,
@@ -1310,7 +1308,6 @@ class View_change_event : public Binary_log_event
13101308
</pre>
13111309
13121310
@param buf Contains the serialized event.
1313-
@param event_len Length of the serialized event.
13141311
@param descr_event An FDE event, used to get the
13151312
following information
13161313
-binlog_version
@@ -1320,7 +1317,7 @@ class View_change_event : public Binary_log_event
13201317
The content of this object
13211318
depends on the binlog-version currently in use.
13221319
*/
1323-
View_change_event(const char *buf, unsigned int event_len,
1320+
View_change_event(const char *buf,
13241321
const Format_description_event *descr_event);
13251322

13261323
explicit View_change_event(char* raw_view_id);

libbinlogevents/include/statement_events.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -615,8 +615,7 @@ class Query_event: public Binary_log_event
615615
unsigned long auto_increment_offset_arg,
616616
unsigned int number,
617617
unsigned long long table_map_for_update_arg,
618-
int errcode,
619-
unsigned int db_arg_len, unsigned int catalog_arg_len);
618+
int errcode);
620619

621620
/**
622621
The constructor receives a buffer and instantiates a Query_event filled in

libbinlogevents/src/binlog_event.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,7 @@ bool Log_event_footer::event_checksum_test(unsigned char *event_buf,
283283
the constructor of Log_event_header) and
284284
will be pointing to the start of event data
285285
*/
286-
Binary_log_event::Binary_log_event(const char **buf, uint16_t binlog_version,
287-
const char *server_version)
286+
Binary_log_event::Binary_log_event(const char **buf, uint16_t binlog_version)
288287
: m_header(*buf, binlog_version)
289288
{
290289
m_footer= Log_event_footer();
@@ -317,8 +316,7 @@ Binary_log_event::~Binary_log_event()
317316
Unknown_event::Unknown_event(const char* buf,
318317
const Format_description_event *description_event)
319318
: Binary_log_event(&buf,
320-
description_event->binlog_version,
321-
description_event->server_version)
319+
description_event->binlog_version)
322320
{
323321
}
324322
#ifndef HAVE_MYSYS

libbinlogevents/src/control_events.cpp

+15-25
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ namespace binary_log
3030
*/
3131
Rotate_event::Rotate_event(const char* buf, unsigned int event_len,
3232
const Format_description_event *description_event)
33-
: Binary_log_event(&buf, description_event->binlog_version,
34-
description_event->server_version), new_log_ident(0),
35-
flags(DUP_NAME)
33+
: Binary_log_event(&buf, description_event->binlog_version),
34+
new_log_ident(0), flags(DUP_NAME)
3635
{
3736
//buf is advanced in Binary_log_event constructor to point to
3837
//beginning of post-header
@@ -268,8 +267,8 @@ bool Format_description_event::is_version_before_checksum() const
268267

269268
Start_event_v3::Start_event_v3(const char* buf, unsigned int event_len,
270269
const Format_description_event *description_event)
271-
:Binary_log_event(&buf, description_event->binlog_version,
272-
description_event->server_version), binlog_version(BINLOG_VERSION)
270+
:Binary_log_event(&buf, description_event->binlog_version),
271+
binlog_version(BINLOG_VERSION)
273272
{
274273
if (event_len < (unsigned int)description_event->common_header_len +
275274
ST_COMMON_HEADER_LEN_OFFSET)
@@ -466,8 +465,7 @@ Format_description_event::~Format_description_event()
466465
*/
467466
Incident_event::Incident_event(const char *buf, unsigned int event_len,
468467
const Format_description_event *descr_event)
469-
: Binary_log_event(&buf, descr_event->binlog_version,
470-
descr_event->server_version)
468+
: Binary_log_event(&buf, descr_event->binlog_version)
471469
{
472470
//buf is advanced in Binary_log_event constructor to point to
473471
//beginning of post-header
@@ -529,8 +527,7 @@ Incident_event::Incident_event(const char *buf, unsigned int event_len,
529527

530528
Ignorable_event::Ignorable_event(const char *buf,
531529
const Format_description_event *descr_event)
532-
: Binary_log_event(&buf, descr_event->binlog_version,
533-
descr_event->server_version)
530+
: Binary_log_event(&buf, descr_event->binlog_version)
534531
{}
535532

536533
/**
@@ -544,8 +541,7 @@ Ignorable_event::Ignorable_event(const char *buf,
544541
Xid_event::
545542
Xid_event(const char* buf,
546543
const Format_description_event *description_event)
547-
:Binary_log_event(&buf, description_event->binlog_version,
548-
description_event->server_version)
544+
:Binary_log_event(&buf, description_event->binlog_version)
549545
{
550546
//buf is advanced in Binary_log_event constructor to point to
551547
//beginning of post-header
@@ -569,8 +565,7 @@ Xid_event(const char* buf,
569565
XA_prepare_event::
570566
XA_prepare_event(const char* buf,
571567
const Format_description_event *description_event)
572-
: Binary_log_event(&buf, description_event->binlog_version,
573-
description_event->server_version)
568+
: Binary_log_event(&buf, description_event->binlog_version)
574569
{
575570
uint32_t temp= 0;
576571
uint8_t temp_byte;
@@ -596,8 +591,7 @@ XA_prepare_event(const char* buf,
596591
*/
597592
Gtid_event::Gtid_event(const char *buffer, uint32_t event_len,
598593
const Format_description_event *description_event)
599-
: Binary_log_event(&buffer, description_event->binlog_version,
600-
description_event->server_version),
594+
: Binary_log_event(&buffer, description_event->binlog_version),
601595
last_committed(SEQ_UNINIT), sequence_number(SEQ_UNINIT)
602596
{
603597
/*
@@ -662,8 +656,7 @@ Gtid_event::Gtid_event(const char *buffer, uint32_t event_len,
662656
Previous_gtids_event::
663657
Previous_gtids_event(const char *buffer, unsigned int event_len,
664658
const Format_description_event *description_event)
665-
: Binary_log_event(&buffer, description_event->binlog_version,
666-
description_event->server_version)
659+
: Binary_log_event(&buffer, description_event->binlog_version)
667660
{
668661
//buf is advanced in Binary_log_event constructor to point to
669662
//beginning of post-header
@@ -684,10 +677,9 @@ Previous_gtids_event(const char *buffer, unsigned int event_len,
684677
in this event.
685678
*/
686679
Transaction_context_event::
687-
Transaction_context_event(const char *buffer, unsigned int event_len,
680+
Transaction_context_event(const char *buffer,
688681
const Format_description_event *description_event)
689-
: Binary_log_event(&buffer, description_event->binlog_version,
690-
description_event->server_version)
682+
: Binary_log_event(&buffer, description_event->binlog_version)
691683
{
692684
//buf is advanced in Binary_log_event constructor to point to
693685
//beginning of post-header
@@ -814,10 +806,9 @@ View_change_event::View_change_event(char* raw_view_id)
814806
}
815807

816808
View_change_event::
817-
View_change_event(const char *buffer, unsigned int event_len,
809+
View_change_event(const char *buffer,
818810
const Format_description_event *description_event)
819-
: Binary_log_event(&buffer, description_event->binlog_version,
820-
description_event->server_version),
811+
: Binary_log_event(&buffer, description_event->binlog_version),
821812
view_id(), seq_number(0), certification_info()
822813
{
823814
//buf is advanced in Binary_log_event constructor to point to
@@ -892,8 +883,7 @@ View_change_event::~View_change_event()
892883
Heartbeat_event::Heartbeat_event(const char* buf, unsigned int event_len,
893884
const Format_description_event*
894885
description_event)
895-
: Binary_log_event(&buf, description_event->binlog_version,
896-
description_event->server_version),
886+
: Binary_log_event(&buf, description_event->binlog_version),
897887
log_ident(buf)
898888
{
899889
//buf is advanced in Binary_log_event constructor to point to

libbinlogevents/src/load_data_events.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ Execute_load_query_event(const char* buf,
7070
Delete_file_event::Delete_file_event(const char* buf, unsigned int len,
7171
const Format_description_event*
7272
description_event)
73-
: Binary_log_event(&buf, description_event->binlog_version,
74-
description_event->server_version), file_id(0)
73+
: Binary_log_event(&buf, description_event->binlog_version),
74+
file_id(0)
7575
{
7676
//buf is advanced in Binary_log_event constructor to point to
7777
//beginning of post-header
@@ -92,8 +92,8 @@ Delete_file_event::Delete_file_event(const char* buf, unsigned int len,
9292
Append_block_event::Append_block_event(const char* buf, unsigned int len,
9393
const Format_description_event*
9494
description_event)
95-
: Binary_log_event(&buf, description_event->binlog_version,
96-
description_event->server_version), block(0)
95+
: Binary_log_event(&buf, description_event->binlog_version),
96+
block(0)
9797
{
9898
//buf is advanced in Binary_log_event constructor to point to
9999
//beginning of post-header

libbinlogevents/src/rows_event.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ static unsigned long get_field_length(unsigned char **packet)
6969
Table_map_event::Table_map_event(const char *buf, unsigned int event_len,
7070
const Format_description_event*
7171
description_event)
72-
: Binary_log_event(&buf, description_event->binlog_version,
73-
description_event->server_version),
72+
: Binary_log_event(&buf, description_event->binlog_version),
7473
m_table_id(0), m_flags(0), m_data_size(0),
7574
m_dbnam(""), m_dblen(0), m_tblnam(""), m_tbllen(0),
7675
m_colcnt(0), m_field_metadata_size(0), m_field_metadata(0), m_null_bits(0)
@@ -166,8 +165,7 @@ Table_map_event::~Table_map_event()
166165
*****************************************************************************/
167166
Rows_event::Rows_event(const char *buf, unsigned int event_len,
168167
const Format_description_event *description_event)
169-
: Binary_log_event(&buf, description_event->binlog_version,
170-
description_event->server_version),
168+
: Binary_log_event(&buf, description_event->binlog_version),
171169
m_table_id(0), m_width(0), m_extra_row_data(0),
172170
columns_before_image(0), columns_after_image(0), row(0)
173171
{

libbinlogevents/src/statement_events.cpp

+6-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2014, 2016, 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
@@ -47,8 +47,7 @@ Query_event::Query_event(const char* query_arg, const char* catalog_arg,
4747
unsigned long auto_increment_offset_arg,
4848
unsigned int number,
4949
unsigned long long table_map_for_update_arg,
50-
int errcode,
51-
unsigned int db_arg_len, unsigned int catalog_arg_len)
50+
int errcode)
5251
: Binary_log_event(QUERY_EVENT),
5352
query(query_arg), db(db_arg), catalog(catalog_arg),
5453
user(0), user_len(0), host(0), host_len(0),
@@ -109,8 +108,7 @@ static void copy_str_and_move(Log_event_header::Byte **dst,
109108
Query_event::Query_event(const char* buf, unsigned int event_len,
110109
const Format_description_event *description_event,
111110
Log_event_type event_type)
112-
: Binary_log_event(&buf, description_event->binlog_version,
113-
description_event->server_version),
111+
: Binary_log_event(&buf, description_event->binlog_version),
114112
query(0), db(0), catalog(0), time_zone_str(0),
115113
user(0), user_len(0), host(0), host_len(0),
116114
db_len(0), status_vars_len(0), q_len(0),
@@ -446,8 +444,7 @@ int Query_event::fill_data_buf(Log_event_header::Byte* buf,
446444
User_var_event::
447445
User_var_event(const char* buf, unsigned int event_len,
448446
const Format_description_event* description_event)
449-
:Binary_log_event(&buf, description_event->binlog_version,
450-
description_event->server_version)
447+
:Binary_log_event(&buf, description_event->binlog_version)
451448
{
452449
//buf is advanced in Binary_log_event constructor to point to
453450
//beginning of post-header
@@ -563,8 +560,7 @@ User_var_event(const char* buf, unsigned int event_len,
563560
*/
564561
Intvar_event::Intvar_event(const char* buf,
565562
const Format_description_event* description_event)
566-
: Binary_log_event(&buf, description_event->binlog_version,
567-
description_event->server_version)
563+
: Binary_log_event(&buf, description_event->binlog_version)
568564
{
569565
//buf is advanced in Binary_log_event constructor to point to
570566
//beginning of post-header
@@ -577,8 +573,7 @@ Intvar_event::Intvar_event(const char* buf,
577573

578574
Rand_event::Rand_event(const char* buf,
579575
const Format_description_event* description_event)
580-
:Binary_log_event(&buf, description_event->binlog_version,
581-
description_event->server_version)
576+
:Binary_log_event(&buf, description_event->binlog_version)
582577
{
583578
//buf is advanced in Binary_log_event constructor to point to
584579
//beginning of post-header

0 commit comments

Comments
 (0)