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 | c7fad393fd73cc941190fde1b56a2f9e68e9d132 (patch) | |
tree | 58c6509541b2a20be10d2701ee31d4394c45ad8a /sql/item_create.cc | |
parent | 57a96c77dbd136b5f31f610d0270d7d7b111ddbb (diff) | |
download | mariadb-git-c7fad393fd73cc941190fde1b56a2f9e68e9d132.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.
sql/field.cc:
Local scope variable or method argument same as class
attribute.
sql/item_cmpfunc.cc:
Local scope variable or method argument same as class
attribute.
sql/item_create.cc:
Renaming base class create() to create_func().
sql/item_create.h:
Renaming base class create() to create_func().
sql/protocol.cc:
Local scope variable or method argument same as class
attribute.
sql/sql_profile.cc:
Local scope variable or method argument same as class
attribute.
sql/sql_select.cc:
Local scope variable or method argument same as class
attribute.
sql/sql_yacc.yy:
Renaming base class create() to create_func().
storage/federated/ha_federated.cc:
Local scope variable or method argument same as class
attribute.
storage/myisammrg/ha_myisammrg.cc:
Local scope variable or method argument same as class
attribute.
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r-- | sql/item_create.cc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc index c309ccc06ca..fd8f13d6dc5 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 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 @@ -42,7 +42,7 @@ class Create_native_func : public Create_func { public: - virtual Item *create(THD *thd, LEX_STRING name, List<Item> *item_list); + virtual Item *create_func(THD *thd, LEX_STRING name, List<Item> *item_list); /** Builder method, with no arguments. @@ -69,7 +69,7 @@ protected: class Create_func_arg0 : public Create_func { public: - virtual Item *create(THD *thd, LEX_STRING name, List<Item> *item_list); + virtual Item *create_func(THD *thd, LEX_STRING name, List<Item> *item_list); /** Builder method, with no arguments. @@ -93,7 +93,7 @@ protected: class Create_func_arg1 : public Create_func { public: - virtual Item *create(THD *thd, LEX_STRING name, List<Item> *item_list); + virtual Item *create_func(THD *thd, LEX_STRING name, List<Item> *item_list); /** Builder method, with one argument. @@ -118,7 +118,7 @@ protected: class Create_func_arg2 : public Create_func { public: - virtual Item *create(THD *thd, LEX_STRING name, List<Item> *item_list); + virtual Item *create_func(THD *thd, LEX_STRING name, List<Item> *item_list); /** Builder method, with two arguments. @@ -144,7 +144,7 @@ protected: class Create_func_arg3 : public Create_func { public: - virtual Item *create(THD *thd, LEX_STRING name, List<Item> *item_list); + virtual Item *create_func(THD *thd, LEX_STRING name, List<Item> *item_list); /** Builder method, with three arguments. @@ -194,7 +194,7 @@ protected: class Create_func_no_geom : public Create_func { public: - virtual Item *create(THD *thd, LEX_STRING name, List<Item> *item_list); + virtual Item *create_func(THD *thd, LEX_STRING name, List<Item> *item_list); /** Singleton. */ static Create_func_no_geom s_singleton; @@ -2315,7 +2315,7 @@ static bool has_named_parameters(List<Item> *params) Create_func_no_geom Create_func_no_geom::s_singleton; Item* -Create_func_no_geom::create(THD * /* unused */, +Create_func_no_geom::create_func(THD * /* unused */, LEX_STRING /* unused */, List<Item> * /* unused */) { @@ -2328,7 +2328,7 @@ Create_func_no_geom::create(THD * /* unused */, Item* -Create_qfunc::create(THD *thd, LEX_STRING name, List<Item> *item_list) +Create_qfunc::create_func(THD *thd, LEX_STRING name, List<Item> *item_list) { LEX_STRING db; @@ -2361,7 +2361,7 @@ Create_qfunc::create(THD *thd, LEX_STRING name, List<Item> *item_list) Create_udf_func Create_udf_func::s_singleton; Item* -Create_udf_func::create(THD *thd, LEX_STRING name, List<Item> *item_list) +Create_udf_func::create_func(THD *thd, LEX_STRING name, List<Item> *item_list) { udf_func *udf= find_udf(name.str, name.length); DBUG_ASSERT(udf); @@ -2512,7 +2512,7 @@ Create_sp_func::create(THD *thd, LEX_STRING db, LEX_STRING name, Item* -Create_native_func::create(THD *thd, LEX_STRING name, List<Item> *item_list) +Create_native_func::create_func(THD *thd, LEX_STRING name, List<Item> *item_list) { if (has_named_parameters(item_list)) { @@ -2525,7 +2525,7 @@ Create_native_func::create(THD *thd, LEX_STRING name, List<Item> *item_list) Item* -Create_func_arg0::create(THD *thd, LEX_STRING name, List<Item> *item_list) +Create_func_arg0::create_func(THD *thd, LEX_STRING name, List<Item> *item_list) { int arg_count= 0; @@ -2543,7 +2543,7 @@ Create_func_arg0::create(THD *thd, LEX_STRING name, List<Item> *item_list) Item* -Create_func_arg1::create(THD *thd, LEX_STRING name, List<Item> *item_list) +Create_func_arg1::create_func(THD *thd, LEX_STRING name, List<Item> *item_list) { int arg_count= 0; @@ -2569,7 +2569,7 @@ Create_func_arg1::create(THD *thd, LEX_STRING name, List<Item> *item_list) Item* -Create_func_arg2::create(THD *thd, LEX_STRING name, List<Item> *item_list) +Create_func_arg2::create_func(THD *thd, LEX_STRING name, List<Item> *item_list) { int arg_count= 0; @@ -2597,7 +2597,7 @@ Create_func_arg2::create(THD *thd, LEX_STRING name, List<Item> *item_list) Item* -Create_func_arg3::create(THD *thd, LEX_STRING name, List<Item> *item_list) +Create_func_arg3::create_func(THD *thd, LEX_STRING name, List<Item> *item_list) { int arg_count= 0; |