diff options
author | unknown <monty@mysql.com/narttu.mysql.fi> | 2006-11-30 18:25:05 +0200 |
---|---|---|
committer | unknown <monty@mysql.com/narttu.mysql.fi> | 2006-11-30 18:25:05 +0200 |
commit | 47cca173c04559bc6790d47d505508c69e69ed8e (patch) | |
tree | 66e16346c4fdfa20f915fdf53ea1f9419c07331c /sql-common | |
parent | 193e34277e56df9d64afb78e744f008934663a35 (diff) | |
download | mariadb-git-47cca173c04559bc6790d47d505508c69e69ed8e.tar.gz |
Fixed portability issue in my_thr_init.c (was added in my last push)
Fixed compiler warnings (detected by VC++):
- Removed not used variables
- Added casts
- Fixed wrong assignments to bool
- Fixed wrong calls with bool arguments
- Added missing argument to store(longlong), which caused wrong store method to be called.
client/mysqldump.c:
Removed compiler warning
heap/hp_clear.c:
Removed compiler warning
include/my_global.h:
Removed compiler warning
include/my_tree.h:
Changed memory limits from int to ulong
(Allowed me to get rid of some compiler warnings)
myisam/mi_create.c:
Removed compiler warning
myisam/myisampack.c:
Removed compiler warning
mysys/base64.c:
Removed compiler warning
mysys/my_thr_init.c:
Fixed portability issue (detected on windows)
Added DBUG_ASSERT to detect if we call my_thread_end() too many times
Don't wait if THR_thread_count == -1 (error condition)
mysys/tree.c:
Removed compiler warning
sql/field.cc:
Removed compiler warning
Fixed wrong parameter to check_date()
Added missing argument to store(longlong)
sql/ha_archive.cc:
Removed compiler warning
sql/ha_federated.cc:
Removed compiler warning
sql/ha_innodb.cc:
Removed not used variable
sql/handler.cc:
Removed not used variable
Fixed wrong if (we didn't detect if rollback or commit failed). Not critical as value is not yet used
sql/item.cc:
Removed compiler warning
sql/item_func.cc:
Removed compiler warning
sql/item_strfunc.cc:
Removed compiler warning
sql/item_timefunc.cc:
Removed compiler warning
sql/log.cc:
Removed compiler warning
sql/mysql_priv.h:
Removed compiler warning
sql/opt_range.cc:
Removed compiler warning
sql/password.c:
Removed compiler warning
sql/set_var.cc:
Removed compiler warning
sql/slave.cc:
Removed compiler warning
sql/sp.cc:
Removed compiler warning
sql/sp_cache.cc:
Removed compiler warning
sql/sp_head.cc:
Removed compiler warning
Adjusted argument to reserve() to not use up too much memory that we are probably not going to need
sql/sql_acl.cc:
Added missing argument to store(longlong)
sql/sql_base.cc:
Removed compiler warning
sql/sql_db.cc:
Removed compiler warning
sql/sql_delete.cc:
Removed compiler warning
sql/sql_handler.cc:
Removed not used variable
sql/sql_lex.h:
Removed not used variable
sql/sql_prepare.cc:
Removed not used variable
sql/sql_rename.cc:
Removed not used variable
sql/sql_select.cc:
Fixed that select_options are not 'cut'
Removed some not used variables
Removed compiler warnings by adding cast
sql/sql_show.cc:
Removed not used variables
Added missing argument to store(longlong)
Removed compiler warnings
sql/sql_trigger.cc:
Removed not used variables
Added cast to remove compiler warnings
sql/sql_update.cc:
Fixed wrong set of bool variable
sql/sql_view.cc:
Removed not used variables
Added cast to get rid of compiler warnings
sql-common/client.c:
Fixed compiler warning
sql-common/my_time.c:
Fixed wrong argument to check_date()
Added casts to get rid of compiler warnings
sql/sql_yacc.yy:
Removed not used variable
sql/uniques.cc:
Changes memory size from uint to ulong
Added casts to get rid of compiler warnings
strings/ctype-simple.c:
Fixed cast to get rid of compiler warnings
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 2 | ||||
-rw-r--r-- | sql-common/my_time.c | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index 44b7940a503..c8984e29a34 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -1217,7 +1217,7 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields, { uchar *pos; /* fields count may be wrong */ - DBUG_ASSERT ((field - result) < fields); + DBUG_ASSERT((uint) (field - result) < fields); cli_fetch_lengths(&lengths[0], row->data, default_value ? 8 : 7); field->catalog = strdup_root(alloc,(char*) row->data[0]); field->db = strdup_root(alloc,(char*) row->data[1]); diff --git a/sql-common/my_time.c b/sql-common/my_time.c index efef1d98673..40bc9c79b63 100644 --- a/sql-common/my_time.c +++ b/sql-common/my_time.c @@ -429,7 +429,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time, goto err; } - if (check_date(l_time, not_zero_date, flags, was_cut)) + if (check_date(l_time, not_zero_date != 0, flags, was_cut)) goto err; l_time->time_type= (number_of_fields <= 3 ? @@ -530,15 +530,15 @@ my_bool str_to_time(const char *str, uint length, MYSQL_TIME *l_time, if ((uint) (end-str) > 1 && str != end_of_days && my_isdigit(&my_charset_latin1, *str)) { /* Found days part */ - date[0]= value; + date[0]= (ulong) value; state= 1; /* Assume next is hours */ found_days= 1; } else if ((end-str) > 1 && *str == time_separator && my_isdigit(&my_charset_latin1, str[1])) { - date[0]=0; /* Assume we found hours */ - date[1]=value; + date[0]= 0; /* Assume we found hours */ + date[1]= (ulong) value; state=2; found_hours=1; str++; /* skip ':' */ @@ -547,9 +547,9 @@ my_bool str_to_time(const char *str, uint length, MYSQL_TIME *l_time, { /* String given as one number; assume HHMMSS format */ date[0]= 0; - date[1]= value/10000; - date[2]= value/100 % 100; - date[3]= value % 100; + date[1]= (ulong) (value/10000); + date[2]= (ulong) (value/100 % 100); + date[3]= (ulong) (value % 100); state=4; goto fractional; } @@ -559,7 +559,7 @@ my_bool str_to_time(const char *str, uint length, MYSQL_TIME *l_time, { for (value=0; str != end && my_isdigit(&my_charset_latin1,*str) ; str++) value=value*10L + (long) (*str - '0'); - date[state++]=value; + date[state++]= (ulong) value; if (state == 4 || (end-str) < 2 || *str != time_separator || !my_isdigit(&my_charset_latin1,str[1])) break; @@ -594,7 +594,7 @@ fractional: value*= (long) log_10_int[field_length]; else if (field_length < 0) *warning|= MYSQL_TIME_WARN_TRUNCATED; - date[4]=value; + date[4]= (ulong) value; } else date[4]=0; |