summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-07-20 15:07:36 -0300
committerDavi Arnaut <davi.arnaut@oracle.com>2010-07-20 15:07:36 -0300
commitc96b249fc3912f7a86f885cc62da1a3eeed537c6 (patch)
tree3be217b0b2b0e9c76e6f41abe8c7fa3aeb35d373 /sql/sql_repl.cc
parentd676c3ff0eef8613ac689df8ed07ecdd0a39817b (diff)
downloadmariadb-git-c96b249fc3912f7a86f885cc62da1a3eeed537c6.tar.gz
Bug#45288: pb2 returns a lot of compilation warnings on linux
Fix warnings flagged by the new warning option -Wunused-but-set-variable that was added to GCC 4.6 and that is enabled by -Wunused and -Wall. The option causes a warning whenever a local variable is assigned to but is later unused. It also warns about meaningless pointer dereferences.
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index f6045e4704e..d7dd3eb63f2 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -1168,12 +1168,9 @@ bool change_master(THD* thd, Master_info* mi)
/*
Before processing the command, save the previous state.
*/
- char *pos;
- pos= strmake(saved_host, mi->host, HOSTNAME_LENGTH);
- pos= '\0';
+ strmake(saved_host, mi->host, HOSTNAME_LENGTH);
saved_port= mi->port;
- pos= strmake(saved_log_name, mi->master_log_name, FN_REFLEN - 1);
- pos= '\0';
+ strmake(saved_log_name, mi->master_log_name, FN_REFLEN - 1);
saved_log_pos= mi->master_log_pos;
/*