summaryrefslogtreecommitdiff
path: root/include/my_compare.h
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 /include/my_compare.h
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 'include/my_compare.h')
-rw-r--r--include/my_compare.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/my_compare.h b/include/my_compare.h
index 12f9971d49b..f53d00ec453 100644
--- a/include/my_compare.h
+++ b/include/my_compare.h
@@ -84,7 +84,7 @@ typedef struct st_HA_KEYSEG /* Key-portion */
#define store_key_length_inc(key,length) \
{ if ((length) < 255) \
- { *(key)++= (length); } \
+ { *(key)++= (uchar)(length); } \
else \
{ *(key)=255; mi_int2store((key)+1,(length)); (key)+=3; } \
}
@@ -107,8 +107,8 @@ typedef struct st_HA_KEYSEG /* Key-portion */
#define clr_rec_bits(bit_ptr, bit_ofs, bit_len) \
set_rec_bits(0, bit_ptr, bit_ofs, bit_len)
-extern int ha_compare_text(CHARSET_INFO *, const uchar *, uint,
- const uchar *, uint , my_bool);
+extern int ha_compare_text(CHARSET_INFO *, const uchar *, size_t,
+ const uchar *, size_t , my_bool);
extern int ha_key_cmp(HA_KEYSEG *keyseg, const uchar *a,
const uchar *b, uint key_length, uint nextflag,
uint *diff_pos);