summaryrefslogtreecommitdiff
path: root/sql/item_func.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2017-09-23 15:48:47 +0400
committerAlexander Barkov <bar@mariadb.org>2017-09-23 15:48:47 +0400
commit840f1310cb6ee15cffdac5a4d2a95551575b2c3b (patch)
treed9151e92561eb73da935cfd2320e047635b677e2 /sql/item_func.h
parentb652430f0094e2baa475b6ea3a3d87da24202f76 (diff)
downloadmariadb-git-840f1310cb6ee15cffdac5a4d2a95551575b2c3b.tar.gz
Fixing a few -Wconversion warnings
Diffstat (limited to 'sql/item_func.h')
-rw-r--r--sql/item_func.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/item_func.h b/sql/item_func.h
index 9a6254438f0..1953441d93d 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -928,7 +928,8 @@ class Item_decimal_typecast :public Item_func
{
my_decimal decimal_value;
public:
- Item_decimal_typecast(THD *thd, Item *a, int len, int dec): Item_func(thd, a)
+ Item_decimal_typecast(THD *thd, Item *a, uint len, uint dec)
+ :Item_func(thd, a)
{
decimals= (uint8) dec;
collation.set_numeric();
@@ -956,7 +957,7 @@ public:
class Item_double_typecast :public Item_real_func
{
public:
- Item_double_typecast(THD *thd, Item *a, int len, int dec):
+ Item_double_typecast(THD *thd, Item *a, uint len, uint dec):
Item_real_func(thd, a)
{
decimals= (uint8) dec;
@@ -2398,7 +2399,10 @@ class Item_user_var_as_out_param :public Item
public:
Item_user_var_as_out_param(THD *thd, const LEX_CSTRING *a)
:Item(thd), name(*a)
- { set_name(thd, a->str, a->length, system_charset_info); }
+ {
+ DBUG_ASSERT(a->length < UINT_MAX32);
+ set_name(thd, a->str, (uint) a->length, system_charset_info);
+ }
/* We should return something different from FIELD_ITEM here */
enum Type type() const { return STRING_ITEM;}
double val_real();