mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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:
@ -18,15 +18,15 @@
|
||||
|
||||
typedef struct st_typelib TYPELIB;
|
||||
|
||||
ulonglong find_set(TYPELIB *lib, const char *x, uint length, CHARSET_INFO *cs,
|
||||
ulonglong find_set(TYPELIB *lib, const char *x, size_t length, CHARSET_INFO *cs,
|
||||
char **err_pos, uint *err_len, bool *set_warning);
|
||||
ulonglong find_set_from_flags(TYPELIB *lib, uint default_name,
|
||||
ulonglong cur_set, ulonglong default_set,
|
||||
const char *str, uint length, CHARSET_INFO *cs,
|
||||
char **err_pos, uint *err_len, bool *set_warning);
|
||||
uint find_type(const TYPELIB *lib, const char *find, uint length,
|
||||
uint find_type(const TYPELIB *lib, const char *find, size_t length,
|
||||
bool part_match);
|
||||
uint find_type2(const TYPELIB *lib, const char *find, uint length,
|
||||
uint find_type2(const TYPELIB *lib, const char *find, size_t length,
|
||||
CHARSET_INFO *cs);
|
||||
void unhex_type2(TYPELIB *lib);
|
||||
uint check_word(TYPELIB *lib, const char *val, const char *end,
|
||||
@ -42,7 +42,7 @@ const char *set_to_string(THD *thd, LEX_CSTRING *result, ulonglong set,
|
||||
/*
|
||||
These functions were protected by INNODB_COMPATIBILITY_HOOKS
|
||||
*/
|
||||
uint strconvert(CHARSET_INFO *from_cs, const char *from, uint from_length,
|
||||
CHARSET_INFO *to_cs, char *to, uint to_length, uint *errors);
|
||||
uint strconvert(CHARSET_INFO *from_cs, const char *from, size_t from_length,
|
||||
CHARSET_INFO *to_cs, char *to, size_t to_length, uint *errors);
|
||||
|
||||
#endif /* STRFUNC_INCLUDED */
|
||||
|
Reference in New Issue
Block a user