diff options
author | Davi Arnaut <davi.arnaut@oracle.com> | 2010-10-19 20:36:59 -0200 |
---|---|---|
committer | Davi Arnaut <davi.arnaut@oracle.com> | 2010-10-19 20:36:59 -0200 |
commit | 1040f98ccffccbed8d1e95fe8252e402b8ee4e3f (patch) | |
tree | 5560db90147dedcfccab23a9d59fb20480b93f51 /client | |
parent | 7406b38efa0a2eec5a245839c5ce13b85d51d125 (diff) | |
download | mariadb-git-1040f98ccffccbed8d1e95fe8252e402b8ee4e3f.tar.gz |
Bug#45288: pb2 returns a lot of compilation warnings
Tag or remove unused arguments and variables.
regex/main.c:
Use the real prototype.
sql/ha_ndbcluster.cc:
Make conditions less ambiguous.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 15 | ||||
-rw-r--r-- | client/sql_string.h | 10 |
2 files changed, 17 insertions, 8 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 5b90f318629..4c2c75dc79a 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -3725,7 +3725,8 @@ print_tab_data(MYSQL_RES *result) } static int -com_tee(String *buffer, char *line __attribute__((unused))) +com_tee(String *buffer __attribute__((unused)), + char *line __attribute__((unused))) { char file_name[FN_REFLEN], *end, *param; @@ -3784,7 +3785,8 @@ com_notee(String *buffer __attribute__((unused)), #ifdef USE_POPEN static int -com_pager(String *buffer, char *line __attribute__((unused))) +com_pager(String *buffer __attribute__((unused)), + char *line __attribute__((unused))) { char pager_name[FN_REFLEN], *end, *param; @@ -3911,7 +3913,8 @@ com_rehash(String *buffer __attribute__((unused)), #ifdef USE_POPEN static int -com_shell(String *buffer, char *line __attribute__((unused))) +com_shell(String *buffer __attribute__((unused)), + char *line __attribute__((unused))) { char *shell_cmd; @@ -4003,7 +4006,8 @@ com_connect(String *buffer, char *line) } -static int com_source(String *buffer, char *line) +static int com_source(String *buffer __attribute__((unused)), + char *line) { char source_name[FN_REFLEN], *end, *param; LINE_BUFFER *line_buff; @@ -4908,7 +4912,8 @@ static void init_username() } } -static int com_prompt(String *buffer, char *line) +static int com_prompt(String *buffer __attribute__((unused)), + char *line) { char *ptr=strchr(line, ' '); prompt_counter = 0; diff --git a/client/sql_string.h b/client/sql_string.h index da19c1ccfe5..84fe26a54b9 100644 --- a/client/sql_string.h +++ b/client/sql_string.h @@ -70,9 +70,13 @@ public: } static void *operator new(size_t size, MEM_ROOT *mem_root) { return (void*) alloc_root(mem_root, (uint) size); } - static void operator delete(void *ptr_arg,size_t size) - { TRASH(ptr_arg, size); } - static void operator delete(void *ptr_arg, MEM_ROOT *mem_root) + static void operator delete(void *ptr_arg, size_t size) + { + (void) ptr_arg; + (void) size; + TRASH(ptr_arg, size); + } + static void operator delete(void *, MEM_ROOT *) { /* never called */ } ~String() { free(); } |