diff options
author | Staale Smedseng <staale.smedseng@sun.com> | 2010-03-14 17:01:45 +0100 |
---|---|---|
committer | Staale Smedseng <staale.smedseng@sun.com> | 2010-03-14 17:01:45 +0100 |
commit | 3f4d8edb84a2980f636d27b40244edfa98cbdfe4 (patch) | |
tree | 58c6509541b2a20be10d2701ee31d4394c45ad8a /sql/item_cmpfunc.cc | |
parent | 0e9451186d8812d405d5659f943427bb2beb57e5 (diff) | |
download | mariadb-git-3f4d8edb84a2980f636d27b40244edfa98cbdfe4.tar.gz |
Bug #49829 Many "hides virtual function" warnings with
SunStudio
SunStudio compilers of late warn about methods that might hide
methods in base classes due to the use of overloading combined
with overriding. SunStudio also warns about variables defined
in local socpe or method arguments that have the same name as
a member attribute of the class.
This patch renames methods that might hide base class methods,
to make it easier both for humans and compilers to see what is
actually called. It also renames variables in local scope.
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 1d33e369af0..cd3f18fe1eb 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright (c) 2000, 2010 Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1022,12 +1022,12 @@ bool Arg_comparator::try_year_cmp_func(Item_result type) @return cache item or original value. */ -Item** Arg_comparator::cache_converted_constant(THD *thd, Item **value, +Item** Arg_comparator::cache_converted_constant(THD *thd_arg, Item **value, Item **cache_item, Item_result type) { /* Don't need cache if doing context analysis only. */ - if (!thd->is_context_analysis_only() && + if (!thd_arg->is_context_analysis_only() && (*value)->const_item() && type != (*value)->result_type()) { Item_cache *cache= Item_cache::get_cache(*value, type); @@ -1368,12 +1368,12 @@ int Arg_comparator::compare_real() int Arg_comparator::compare_decimal() { - my_decimal value1; - my_decimal *val1= (*a)->val_decimal(&value1); + my_decimal decimal1; + my_decimal *val1= (*a)->val_decimal(&decimal1); if (!(*a)->null_value) { - my_decimal value2; - my_decimal *val2= (*b)->val_decimal(&value2); + my_decimal decimal2; + my_decimal *val2= (*b)->val_decimal(&decimal2); if (!(*b)->null_value) { if (set_null) @@ -1397,9 +1397,9 @@ int Arg_comparator::compare_e_real() int Arg_comparator::compare_e_decimal() { - my_decimal value1, value2; - my_decimal *val1= (*a)->val_decimal(&value1); - my_decimal *val2= (*b)->val_decimal(&value2); + my_decimal decimal1, decimal2; + my_decimal *val1= (*a)->val_decimal(&decimal1); + my_decimal *val2= (*b)->val_decimal(&decimal2); if ((*a)->null_value || (*b)->null_value) return test((*a)->null_value && (*b)->null_value); return test(my_decimal_cmp(val1, val2) == 0); @@ -5402,11 +5402,11 @@ void Item_equal::merge(Item_equal *item) members follow in a wrong order they are swapped. This is performed again and again until we get all members in a right order. - @param cmp function to compare field item + @param compare function to compare field item @param arg context extra parameter for the cmp function */ -void Item_equal::sort(Item_field_cmpfunc cmp, void *arg) +void Item_equal::sort(Item_field_cmpfunc compare, void *arg) { bool swap; List_iterator<Item_field> it(fields); @@ -5420,7 +5420,7 @@ void Item_equal::sort(Item_field_cmpfunc cmp, void *arg) while ((item2= it++)) { Item_field **ref2= it.ref(); - if (cmp(item1, item2, arg) < 0) + if (compare(item1, item2, arg) < 0) { Item_field *item= *ref1; *ref1= *ref2; |