mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data)
Handle string length as size_t, consistently (almost always:)) Change function prototypes to accept size_t, where in the past ulong or uint were used. change local/member variables to size_t when appropriate. This fix excludes rocksdb, spider,spider, sphinx and connect for now.
This commit is contained in:
@ -38,8 +38,7 @@ bool time_to_datetime(MYSQL_TIME *ltime);
|
||||
void time_to_daytime_interval(MYSQL_TIME *l_time);
|
||||
bool get_date_from_daynr(long daynr,uint *year, uint *month, uint *day);
|
||||
my_time_t TIME_to_timestamp(THD *thd, const MYSQL_TIME *t, uint *error_code);
|
||||
bool str_to_datetime_with_warn(CHARSET_INFO *cs, const char *str,
|
||||
uint length, MYSQL_TIME *l_time,
|
||||
bool str_to_datetime_with_warn(CHARSET_INFO *cs, const char *str, size_t length, MYSQL_TIME *l_time,
|
||||
ulonglong flags);
|
||||
bool double_to_datetime_with_warn(double value, MYSQL_TIME *ltime,
|
||||
ulonglong fuzzydate,
|
||||
@ -122,8 +121,7 @@ void make_truncated_value_warning(THD *thd,
|
||||
const char *field_name);
|
||||
|
||||
static inline void make_truncated_value_warning(THD *thd,
|
||||
Sql_condition::enum_warning_level level, const char *str_val,
|
||||
uint str_length, timestamp_type time_type,
|
||||
Sql_condition::enum_warning_level level, const char *str_val, size_t str_length, timestamp_type time_type,
|
||||
const char *field_name)
|
||||
{
|
||||
const ErrConvString str(str_val, str_length, &my_charset_bin);
|
||||
@ -179,12 +177,12 @@ bool parse_date_time_format(timestamp_type format_type,
|
||||
const char *format, uint format_length,
|
||||
DATE_TIME_FORMAT *date_time_format);
|
||||
/* Character set-aware version of str_to_time() */
|
||||
bool str_to_time(CHARSET_INFO *cs, const char *str,uint length,
|
||||
bool str_to_time(CHARSET_INFO *cs, const char *str,size_t length,
|
||||
MYSQL_TIME *l_time, ulonglong fuzzydate,
|
||||
MYSQL_TIME_STATUS *status);
|
||||
/* Character set-aware version of str_to_datetime() */
|
||||
bool str_to_datetime(CHARSET_INFO *cs,
|
||||
const char *str, uint length,
|
||||
const char *str, size_t length,
|
||||
MYSQL_TIME *l_time, ulonglong flags,
|
||||
MYSQL_TIME_STATUS *status);
|
||||
|
||||
|
Reference in New Issue
Block a user