summaryrefslogtreecommitdiff
path: root/strings/ctype.c
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2018-02-06 12:55:58 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2018-02-06 12:55:58 +0000
commit6c279ad6a71c63cb595fde7c951aadb31c3dbebc (patch)
tree3603f88e1b3bd1e622edb182cccd882dd31ddc8a /strings/ctype.c
parentf271100836d8a91a775894ec36b869a66a3145e5 (diff)
downloadmariadb-git-6c279ad6a71c63cb595fde7c951aadb31c3dbebc.tar.gz
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.
Diffstat (limited to 'strings/ctype.c')
-rw-r--r--strings/ctype.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/strings/ctype.c b/strings/ctype.c
index 64ebd51676f..28bfbf16ff6 100644
--- a/strings/ctype.c
+++ b/strings/ctype.c
@@ -831,7 +831,7 @@ my_parse_charset_xml(MY_CHARSET_LOADER *loader, const char *buf, size_t len)
uint
-my_string_repertoire_8bit(CHARSET_INFO *cs, const char *str, ulong length)
+my_string_repertoire_8bit(CHARSET_INFO *cs, const char *str, size_t length)
{
const char *strend;
if ((cs->state & MY_CS_NONASCII) && length > 0)
@@ -917,7 +917,7 @@ my_string_metadata_get(MY_STRING_METADATA *metadata,
Check repertoire: detect pure ascii strings
*/
uint
-my_string_repertoire(CHARSET_INFO *cs, const char *str, ulong length)
+my_string_repertoire(CHARSET_INFO *cs, const char *str, size_t length)
{
if (cs->mbminlen == 1 && !(cs->state & MY_CS_NONASCII))
{
@@ -1001,9 +1001,9 @@ my_charset_is_ascii_based(CHARSET_INFO *cs)
*/
uint32
-my_convert_using_func(char *to, uint32 to_length,
+my_convert_using_func(char *to, size_t to_length,
CHARSET_INFO *to_cs, my_charset_conv_wc_mb wc_mb,
- const char *from, uint32 from_length,
+ const char *from, size_t from_length,
CHARSET_INFO *from_cs, my_charset_conv_mb_wc mb_wc,
uint *errors)
{