Skip to content

Commit 75dd94c

Browse files
committed
Fixed compiler warnings
Remove compiler warnings in sphinx, item_sum.cc and opt_split.cc
1 parent d572c19 commit 75dd94c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

sql/item_sum.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2414,7 +2414,7 @@ Item *Item_sum_min::copy_or_same(THD* thd)
24142414

24152415
bool Item_sum_min::add()
24162416
{
2417-
Item *tmp_item;
2417+
Item *UNINIT_VAR(tmp_item);
24182418
DBUG_ENTER("Item_sum_min::add");
24192419
DBUG_PRINT("enter", ("this: %p", this));
24202420

sql/opt_split.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,8 +866,8 @@ SplM_plan_info * JOIN_TAB::choose_best_splitting(double record_count,
866866
TABLE *best_table= 0;
867867
double best_rec_per_key= DBL_MAX;
868868
SplM_plan_info *spl_plan= 0;
869-
uint best_key;
870-
uint best_key_parts;
869+
uint best_key= 0;
870+
uint best_key_parts= 0;
871871

872872
/*
873873
Check whether there are keys that can be used to join T employing splitting

storage/sphinx/snippets_udf.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ enum
177177
SEARCHD_WARNING = 3 ///< general success, warning message and command-specific reply follow
178178
};
179179

180-
#define SPHINXSE_DEFAULT_SCHEME "sphinx"
181-
#define SPHINXSE_DEFAULT_HOST "127.0.0.1"
180+
#define SPHINXSE_DEFAULT_SCHEME (char*) "sphinx"
181+
#define SPHINXSE_DEFAULT_HOST (char*) "127.0.0.1"
182182
#define SPHINXSE_DEFAULT_PORT 9312
183-
#define SPHINXSE_DEFAULT_INDEX "*"
183+
#define SPHINXSE_DEFAULT_INDEX (char*) "*"
184184

185185
class CSphBuffer
186186
{
@@ -446,7 +446,7 @@ int CSphUrl::Connect()
446446
uint uServerVersion;
447447
uint uClientVersion = htonl ( SPHINX_SEARCHD_PROTO );
448448
int iSocket = -1;
449-
char * pError = NULL;
449+
const char * pError = NULL;
450450
do
451451
{
452452
iSocket = (int)socket ( iDomain, SOCK_STREAM, 0 );

0 commit comments

Comments
 (0)