Skip to content

Commit 58264f6

Browse files
author
Tor Didriksen
committed
Bug#19459193 GET RID OF DYNAMIC_ARRAY IN CIRCULAR_BUFFER_QUEUE
Post-push fix: -Werror build broken in optimized mode gcc 4.4 was warning: error: 'group.st_slave_job_group::ts' solution: use value-initialization of two stack-allocated objects of type Slave_job_group gcc 4.7 gives warning warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] solution: annotate it with __attribute__((unused))
1 parent 26eb424 commit 58264f6

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

sql/log_event.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2969,7 +2969,7 @@ bool schedule_next_event(Log_event* ev, Relay_log_info* rli)
29692969

29702970
Slave_worker *Log_event::get_slave_worker(Relay_log_info *rli)
29712971
{
2972-
Slave_job_group group, *ptr_group= NULL;
2972+
Slave_job_group group= Slave_job_group(), *ptr_group= NULL;
29732973
bool is_s_event;
29742974
Slave_worker *ret_worker= NULL;
29752975
char llbuff[22];

sql/rpl_rli_pdb.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1342,7 +1342,7 @@ ulong Slave_committed_queue::move_queue_head(Slave_worker_array *ws)
13421342
for (i= entry; i != avail && !empty(); cnt++, i= (i + 1) % size)
13431343
{
13441344
Slave_worker *w_i;
1345-
Slave_job_group *ptr_g, g;
1345+
Slave_job_group *ptr_g;
13461346
char grl_name[FN_REFLEN];
13471347

13481348
#ifndef DBUG_OFF
@@ -1382,6 +1382,7 @@ ulong Slave_committed_queue::move_queue_head(Slave_worker_array *ws)
13821382
/*
13831383
Removes the job from the (G)lobal (A)ssigned (Q)ueue.
13841384
*/
1385+
Slave_job_group g= Slave_job_group();
13851386
#ifndef DBUG_OFF
13861387
ulong ind=
13871388
#endif

storage/innobase/ut/ut0new.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ ut_new_boot()
171171
for (size_t i = 0; i < n_auto; i++) {
172172

173173
const std::pair<mem_keys_auto_t::iterator, bool> ret
174+
__attribute__((unused))
174175
= mem_keys_auto.insert(
175176
mem_keys_auto_t::value_type(auto_event_names[i],
176177
&auto_event_keys[i]));

0 commit comments

Comments
 (0)