Skip to content

Commit 780db8e

Browse files
committed
fix build and some warnings
1 parent f4d6f26 commit 780db8e

33 files changed

+43
-145
lines changed

extra/comp_err.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ int main(int argc, char *argv[])
172172
MY_INIT(argv[0]);
173173
{
174174
uint max_error, error_count;
175-
struct errors *error_head;
176-
struct languages *lang_head;
175+
struct errors *error_head= NULL;
176+
struct languages *lang_head= NULL;
177177
DBUG_ENTER("main");
178178

179179
charsets_dir= DEFAULT_CHARSET_DIR;

extra/yassl/include/openssl/crypto.h

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

2020
/* crypto.h for openSSL */
2121

22-
#ifndef ysSSL_crypto_h__
22+
#ifndef yaSSL_crypto_h__
2323
#define yaSSL_crypto_h__
2424

2525
#ifdef YASSL_PREFIX

mysys/thr_lock.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -498,18 +498,6 @@ has_old_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner)
498498
return 0;
499499
}
500500

501-
static inline my_bool have_specific_lock(THR_LOCK_DATA *data,
502-
enum thr_lock_type type)
503-
{
504-
for ( ; data ; data=data->next)
505-
{
506-
if (data->type == type)
507-
return 1;
508-
}
509-
return 0;
510-
}
511-
512-
513501
static void wake_up_waiters(THR_LOCK *lock);
514502

515503

sql/log.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ bool LOGGER::slow_log_print(THD *thd, const char *query, uint query_length,
13071307

13081308
/* fill in user_host value: the format is "%s[%s] @ %s [%s]" */
13091309
user_host_len= (strxnmov(user_host_buff, MAX_USER_HOST_SIZE,
1310-
sctx->priv_user ? sctx->priv_user : "", "[",
1310+
sctx->priv_user, "[",
13111311
sctx->user ? sctx->user : (thd->slave_thread ? "SQL_SLAVE" : ""), "] @ ",
13121312
sctx->host ? sctx->host : "", " [",
13131313
sctx->ip ? sctx->ip : "", "]", NullS) -

sql/log_event_old.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,11 +1582,10 @@ int Old_rows_log_event::do_apply_event(rpl_group_info *rgi)
15821582
break;
15831583

15841584
default:
1585-
rli->report(ERROR_LEVEL, thd->net.last_errno, NULL,
1585+
rli->report(ERROR_LEVEL, thd->net.last_errno, NULL,
15861586
"Error in %s event: row application failed. %s",
1587-
get_type_str(),
1588-
thd->net.last_error ? thd->net.last_error : "");
1589-
thd->is_slave_error= 1;
1587+
get_type_str(), thd->net.last_error);
1588+
thd->is_slave_error = 1;
15901589
break;
15911590
}
15921591

@@ -1625,7 +1624,7 @@ int Old_rows_log_event::do_apply_event(rpl_group_info *rgi)
16251624
"on table %s.%s. %s",
16261625
get_type_str(), table->s->db.str,
16271626
table->s->table_name.str,
1628-
thd->net.last_error ? thd->net.last_error : "");
1627+
thd->net.last_error);
16291628

16301629
/*
16311630
If one day we honour --skip-slave-errors in row-based replication, and

sql/net_serv.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@
6060
#define EXTRA_DEBUG_fflush fflush
6161
#else
6262
static void inline EXTRA_DEBUG_fprintf(...) {}
63+
#ifndef MYSQL_SERVER
6364
static int inline EXTRA_DEBUG_fflush(...) { return 0; }
6465
#endif
66+
#endif
6567
#ifdef MYSQL_SERVER
6668
#define MYSQL_SERVER_my_error my_error
6769
#else

sql/partition_info.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ partition_info *partition_info::get_clone(THD *thd)
4040
MEM_ROOT *mem_root= thd->mem_root;
4141
DBUG_ENTER("partition_info::get_clone");
4242

43-
if (!this)
44-
DBUG_RETURN(NULL);
4543
List_iterator<partition_element> part_it(partitions);
4644
partition_element *part;
4745
partition_info *clone= new (mem_root) partition_info();

sql/records.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static int rr_index_desc(READ_RECORD *info);
6969
bool init_read_record_idx(READ_RECORD *info, THD *thd, TABLE *table,
7070
bool print_error, uint idx, bool reverse)
7171
{
72-
int error;
72+
int error= 0;
7373
DBUG_ENTER("init_read_record_idx");
7474

7575
empty_record(table);

sql/slave.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6043,10 +6043,8 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len)
60436043
60446044
TODO: handling `when' for SHOW SLAVE STATUS' snds behind
60456045
*/
6046-
if ((memcmp(mi->master_log_name, hb.get_log_ident(), hb.get_ident_len())
6047-
&& mi->master_log_name != NULL)
6048-
|| mi->master_log_pos > hb.log_pos)
6049-
{
6046+
if (memcmp(mi->master_log_name, hb.get_log_ident(), hb.get_ident_len()) ||
6047+
mi->master_log_pos > hb.log_pos) {
60506048
/* missed events of heartbeat from the past */
60516049
error= ER_SLAVE_HEARTBEAT_FAILURE;
60526050
error_msg.append(STRING_WITH_LEN("heartbeat is not compatible with local info;"));
@@ -6643,7 +6641,7 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi,
66436641
mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir_ptr);
66446642

66456643
/* we disallow empty users */
6646-
if (mi->user == NULL || mi->user[0] == 0)
6644+
if (mi->user[0] == 0)
66476645
{
66486646
mi->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR, NULL,
66496647
ER_THD(thd, ER_SLAVE_FATAL_ERROR),

sql/sql_audit.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,8 @@ void mysql_audit_finalize()
250250
int initialize_audit_plugin(st_plugin_int *plugin)
251251
{
252252
st_mysql_audit *data= (st_mysql_audit*) plugin->plugin->info;
253-
254-
if (!data->class_mask || !data->event_notify ||
255-
!data->class_mask[0])
256-
{
253+
254+
if (!data->event_notify || !data->class_mask[0]) {
257255
sql_print_error("Plugin '%s' has invalid data.",
258256
plugin->name.str);
259257
return 1;

0 commit comments

Comments
 (0)