summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-03-25 14:05:30 +0300
committerMonty <monty@mariadb.org>2018-03-29 14:19:48 +0300
commit75dd94c7cec7672d90cc3d437c1e105cda1d48a6 (patch)
treeb35465512046293c73e4830ab57c09bf59e9fd7c
parentd572c19f222f331b0a647fcd6731a494d423a5e0 (diff)
downloadmariadb-git-75dd94c7cec7672d90cc3d437c1e105cda1d48a6.tar.gz
Fixed compiler warnings
Remove compiler warnings in sphinx, item_sum.cc and opt_split.cc
-rw-r--r--sql/item_sum.cc2
-rw-r--r--sql/opt_split.cc4
-rw-r--r--storage/sphinx/snippets_udf.cc8
3 files changed, 7 insertions, 7 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 25a0f68f575..04f32921b1d 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -2414,7 +2414,7 @@ Item *Item_sum_min::copy_or_same(THD* thd)
bool Item_sum_min::add()
{
- Item *tmp_item;
+ Item *UNINIT_VAR(tmp_item);
DBUG_ENTER("Item_sum_min::add");
DBUG_PRINT("enter", ("this: %p", this));
diff --git a/sql/opt_split.cc b/sql/opt_split.cc
index 0cb76f03917..6467706bc0b 100644
--- a/sql/opt_split.cc
+++ b/sql/opt_split.cc
@@ -866,8 +866,8 @@ SplM_plan_info * JOIN_TAB::choose_best_splitting(double record_count,
TABLE *best_table= 0;
double best_rec_per_key= DBL_MAX;
SplM_plan_info *spl_plan= 0;
- uint best_key;
- uint best_key_parts;
+ uint best_key= 0;
+ uint best_key_parts= 0;
/*
Check whether there are keys that can be used to join T employing splitting
diff --git a/storage/sphinx/snippets_udf.cc b/storage/sphinx/snippets_udf.cc
index 90fde5d9c63..77f76876819 100644
--- a/storage/sphinx/snippets_udf.cc
+++ b/storage/sphinx/snippets_udf.cc
@@ -177,10 +177,10 @@ enum
SEARCHD_WARNING = 3 ///< general success, warning message and command-specific reply follow
};
-#define SPHINXSE_DEFAULT_SCHEME "sphinx"
-#define SPHINXSE_DEFAULT_HOST "127.0.0.1"
+#define SPHINXSE_DEFAULT_SCHEME (char*) "sphinx"
+#define SPHINXSE_DEFAULT_HOST (char*) "127.0.0.1"
#define SPHINXSE_DEFAULT_PORT 9312
-#define SPHINXSE_DEFAULT_INDEX "*"
+#define SPHINXSE_DEFAULT_INDEX (char*) "*"
class CSphBuffer
{
@@ -446,7 +446,7 @@ int CSphUrl::Connect()
uint uServerVersion;
uint uClientVersion = htonl ( SPHINX_SEARCHD_PROTO );
int iSocket = -1;
- char * pError = NULL;
+ const char * pError = NULL;
do
{
iSocket = (int)socket ( iDomain, SOCK_STREAM, 0 );