diff options
author | Michael Widenius <monty@askmonty.org> | 2011-02-25 20:15:27 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-02-25 20:15:27 +0200 |
commit | 52b64be318d642149933da958d518ad9ee7fed20 (patch) | |
tree | 0aeb7ec43f03be21a874c67ffbeb1e52d8e78dba | |
parent | 6c610ed97964a6370e7082ca1fd1f11c4d6720ba (diff) | |
download | mariadb-git-52b64be318d642149933da958d518ad9ee7fed20.tar.gz |
Fixed compiler warnings
client/readline.cc:
Initialize not used variable (to kill wrong compiler warning)
mysql-test/suite/handler/aria.result:
Updated test result
mysql-test/suite/handler/handler.inc:
Changed index to ensure rows are in a fixed order
mysql-test/suite/handler/heap.result:
Updated test result
mysql-test/suite/handler/innodb.result:
Updated test result
mysql-test/suite/handler/myisam.result:
Updated test result
plugin/handler_socket/handlersocket/Makefile.am:
Use CXX flags to compile
sql/filesort.cc:
Initialize variable that may be used
sql/log.cc:
Initialize not used variable (to kill wrong compiler warning)
sql/opt_range_mrr.cc:
Fixed cast to avoid compiler warning
storage/xtradb/fil/fil0fil.c:
Added cast to avoid compiler warning
-rw-r--r-- | client/readline.cc | 1 | ||||
-rw-r--r-- | mysql-test/suite/handler/aria.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/handler/handler.inc | 2 | ||||
-rw-r--r-- | mysql-test/suite/handler/heap.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/handler/innodb.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/handler/myisam.result | 2 | ||||
-rw-r--r-- | plugin/handler_socket/handlersocket/Makefile.am | 6 | ||||
-rw-r--r-- | sql/filesort.cc | 2 | ||||
-rw-r--r-- | sql/log.cc | 1 | ||||
-rw-r--r-- | sql/opt_range_mrr.cc | 2 | ||||
-rw-r--r-- | storage/xtradb/fil/fil0fil.c | 2 |
11 files changed, 11 insertions, 13 deletions
diff --git a/client/readline.cc b/client/readline.cc index b32cb71b0de..2a66fc6144b 100644 --- a/client/readline.cc +++ b/client/readline.cc @@ -47,6 +47,7 @@ char *batch_readline(LINE_BUFFER *line_buff, bool *truncated) char *pos; ulong out_length; DBUG_ASSERT(truncated != NULL); + LINT_INIT(out_length); if (!(pos=intern_read_line(line_buff,&out_length, truncated))) return 0; diff --git a/mysql-test/suite/handler/aria.result b/mysql-test/suite/handler/aria.result index 24e00293f92..efddd7784fd 100644 --- a/mysql-test/suite/handler/aria.result +++ b/mysql-test/suite/handler/aria.result @@ -329,7 +329,7 @@ a b 16 ccc 16 xxx deallocate prepare stmt; -prepare stmt from 'handler t1 read a>=(?) where a < ? limit 5'; +prepare stmt from 'handler t1 read b>=(?) where a < ? limit 5'; set @a=17, @b=24; execute stmt using @a,@b; a b diff --git a/mysql-test/suite/handler/handler.inc b/mysql-test/suite/handler/handler.inc index a364c15873a..5c87652f2b5 100644 --- a/mysql-test/suite/handler/handler.inc +++ b/mysql-test/suite/handler/handler.inc @@ -195,7 +195,7 @@ execute stmt using @a; execute stmt using @a; deallocate prepare stmt; -prepare stmt from 'handler t1 read a>=(?) where a < ? limit 5'; +prepare stmt from 'handler t1 read b>=(?) where a < ? limit 5'; set @a=17, @b=24; execute stmt using @a,@b; execute stmt using @a,@b; diff --git a/mysql-test/suite/handler/heap.result b/mysql-test/suite/handler/heap.result index 20f16f106de..04bc9c73159 100644 --- a/mysql-test/suite/handler/heap.result +++ b/mysql-test/suite/handler/heap.result @@ -329,7 +329,7 @@ a b 16 ccc 16 xxx deallocate prepare stmt; -prepare stmt from 'handler t1 read a>=(?) where a < ? limit 5'; +prepare stmt from 'handler t1 read b>=(?) where a < ? limit 5'; set @a=17, @b=24; execute stmt using @a,@b; a b diff --git a/mysql-test/suite/handler/innodb.result b/mysql-test/suite/handler/innodb.result index e9e2fc45837..3bf3a1f2c70 100644 --- a/mysql-test/suite/handler/innodb.result +++ b/mysql-test/suite/handler/innodb.result @@ -329,7 +329,7 @@ a b 16 ccc 16 xxx deallocate prepare stmt; -prepare stmt from 'handler t1 read a>=(?) where a < ? limit 5'; +prepare stmt from 'handler t1 read b>=(?) where a < ? limit 5'; set @a=17, @b=24; execute stmt using @a,@b; a b diff --git a/mysql-test/suite/handler/myisam.result b/mysql-test/suite/handler/myisam.result index ff0e7335556..321811d7339 100644 --- a/mysql-test/suite/handler/myisam.result +++ b/mysql-test/suite/handler/myisam.result @@ -329,7 +329,7 @@ a b 16 ccc 16 xxx deallocate prepare stmt; -prepare stmt from 'handler t1 read a>=(?) where a < ? limit 5'; +prepare stmt from 'handler t1 read b>=(?) where a < ? limit 5'; set @a=17, @b=24; execute stmt using @a,@b; a b diff --git a/plugin/handler_socket/handlersocket/Makefile.am b/plugin/handler_socket/handlersocket/Makefile.am index f8e695b67f7..e00b7bc4ea4 100644 --- a/plugin/handler_socket/handlersocket/Makefile.am +++ b/plugin/handler_socket/handlersocket/Makefile.am @@ -1,11 +1,7 @@ -CXXFLAGS += -fimplicit-templates pkgplugindir = $(PLUGIN_DIR) noinst_HEADERS = database.hpp hstcpsvr.hpp hstcpsvr_worker.hpp mysql_incl.hpp pkgplugin_LTLIBRARIES = handlersocket.la handlersocket_la_LDFLAGS = -module ../libhsclient/libhsclient.la -handlersocket_la_CFLAGS = $(MYSQL_INC) $(MYSQL_CFLAGS) $(AM_CFLAGS) \ - -I$(srcdir)/../libhsclient -handlersocket_la_CXXFLAGS = $(MYSQL_INC) $(MYSQL_CFLAGS) $(AM_CFLAGS) \ - -I$(srcdir)/../libhsclient +handlersocket_la_CXXFLAGS = $(MYSQL_INC) $(MYSQL_CFLAGS) $(AM_CXXFLAGS) -fimplicit-templates -I$(srcdir)/../libhsclient handlersocket_la_SOURCES = database.cpp handlersocket.cpp \ hstcpsvr_worker.cpp hstcpsvr.cpp diff --git a/sql/filesort.cc b/sql/filesort.cc index 8f03ee26691..6e3bf27afcc 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -1215,7 +1215,7 @@ int merge_buffers(SORTPARAM *param, IO_CACHE *from_file, QUEUE queue; qsort2_cmp cmp; void *first_cmp_arg; - element_count dupl_count; + element_count dupl_count= 0; uchar *src; THD::killed_state not_killable; uchar *unique_buff= param->unique_buff; diff --git a/sql/log.cc b/sql/log.cc index 7d837938ab4..e8858f0e3c4 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1899,6 +1899,7 @@ static int find_uniq_filename(char *name) size_t buf_length, length; char *start, *end; DBUG_ENTER("find_uniq_filename"); + LINT_INIT(number); length= dirname_part(buff, name, &buf_length); start= name + length; diff --git a/sql/opt_range_mrr.cc b/sql/opt_range_mrr.cc index 2047f6f250c..da6086d6cdc 100644 --- a/sql/opt_range_mrr.cc +++ b/sql/opt_range_mrr.cc @@ -225,7 +225,7 @@ walk_up_n_right: RANGE_SEQ_ENTRY *cur= &seq->stack[seq->i]; uint min_key_length= cur->min_key - seq->param->min_key; - range->ptr= (char*)(int)(key_tree->part); + range->ptr= (char*)(intptr)(key_tree->part); if (cur->min_key_flag & GEOM_FLAG) { range->range_flag= cur->min_key_flag; diff --git a/storage/xtradb/fil/fil0fil.c b/storage/xtradb/fil/fil0fil.c index a8520187013..926b1de3051 100644 --- a/storage/xtradb/fil/fil0fil.c +++ b/storage/xtradb/fil/fil0fil.c @@ -3313,7 +3313,7 @@ skip_info: } if (page_is_corrupt) { - fprintf(stderr, " [errp:%lld]", offset / UNIV_PAGE_SIZE); + fprintf(stderr, " [errp:%lld]", (longlong) (offset / UNIV_PAGE_SIZE)); /* cannot treat corrupt page */ goto skip_write; |