summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2003-07-03 01:08:34 +0200
committerunknown <pem@mysql.com>2003-07-03 01:08:34 +0200
commitc0eb448582cce5b899ed58a0e1b03e8ee732a05c (patch)
tree0951b7ec937b540a0d48fa1cba8a0d38bdf26036
parent0b37eae10748dc4399c8bf0abbb0eadc37333744 (diff)
downloadmariadb-git-c0eb448582cce5b899ed58a0e1b03e8ee732a05c.tar.gz
Added missing (char*) casts in bzero calls.
(Needed for platforms with the traditional bzero prototype.) Fixes BUG#460.
-rw-r--r--sql/slave.cc4
-rw-r--r--sql/slave.h2
-rw-r--r--sql/sql_acl.cc4
-rw-r--r--sql/sql_lex.cc2
-rw-r--r--sql/sql_yacc.yy2
5 files changed, 7 insertions, 7 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index 851c6ba4f02..bc9528ae2c7 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -1710,8 +1710,8 @@ st_relay_log_info::st_relay_log_info()
last_slave_error[0]=0;
- bzero(&info_file,sizeof(info_file));
- bzero(&cache_buf, sizeof(cache_buf));
+ bzero((char *)&info_file,sizeof(info_file));
+ bzero((char *)&cache_buf, sizeof(cache_buf));
pthread_mutex_init(&run_lock, MY_MUTEX_INIT_FAST);
pthread_mutex_init(&data_lock, MY_MUTEX_INIT_FAST);
pthread_mutex_init(&log_space_lock, MY_MUTEX_INIT_FAST);
diff --git a/sql/slave.h b/sql/slave.h
index 66000f45e69..6a73c86d304 100644
--- a/sql/slave.h
+++ b/sql/slave.h
@@ -282,7 +282,7 @@ typedef struct st_master_info
abort_slave(0),slave_running(0), slave_run_id(0)
{
host[0] = 0; user[0] = 0; password[0] = 0;
- bzero(&file, sizeof(file));
+ bzero((char *)&file, sizeof(file));
pthread_mutex_init(&run_lock, MY_MUTEX_INIT_FAST);
pthread_mutex_init(&data_lock, MY_MUTEX_INIT_FAST);
pthread_cond_init(&data_cond, NULL);
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 90497cc8b43..225d84f4751 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -275,7 +275,7 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
else
{
user.ssl_type=SSL_TYPE_NONE;
- bzero(&(user.user_resource),sizeof(user.user_resource));
+ bzero((char *)&(user.user_resource),sizeof(user.user_resource));
#ifndef TO_BE_REMOVED
if (table->fields <= 13)
{ // Without grant
@@ -506,7 +506,7 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
*priv_user=(char*) user;
DBUG_ENTER("acl_getroot");
- bzero(mqh,sizeof(USER_RESOURCES));
+ bzero((char *)mqh,sizeof(USER_RESOURCES));
if (!initialized)
{
// If no data allow anything
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index d5a225d95dd..d62edf83c11 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -152,7 +152,7 @@ LEX *lex_start(THD *thd, uchar *buf,uint length)
lex->ignore_space=test(thd->sql_mode & MODE_IGNORE_SPACE);
lex->slave_thd_opt=0;
lex->sql_command=SQLCOM_END;
- bzero(&lex->mi,sizeof(lex->mi));
+ bzero((char *)&lex->mi,sizeof(lex->mi));
return lex;
}
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index cf94532ac86..4022dd89797 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -3685,7 +3685,7 @@ grant:
lex->select->db= 0;
lex->ssl_type= SSL_TYPE_NOT_SPECIFIED;
lex->ssl_cipher= lex->x509_subject= lex->x509_issuer= 0;
- bzero(&(lex->mqh),sizeof(lex->mqh));
+ bzero((char *)&(lex->mqh),sizeof(lex->mqh));
}
grant_privileges ON opt_table TO_SYM user_list
require_clause grant_options