1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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.
This commit is contained in:
Staale Smedseng
2010-03-14 17:01:45 +01:00
parent 57a96c77db
commit c7fad393fd
16 changed files with 128 additions and 127 deletions

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 2003 MySQL AB
/* Copyright (c) 2003, 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
@@ -155,7 +155,8 @@ public:
/** @brief
This method will never be called if you do not implement indexes.
*/
virtual double read_time(ha_rows rows) { return (double) rows / 20.0+1; }
virtual double read_time(uint, uint, ha_rows rows)
{ return (double) rows / 20.0+1; }
/*
Everything below are methods that we implement in ha_example.cc.