diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2018-02-06 12:55:58 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2018-02-06 12:55:58 +0000 |
commit | 6c279ad6a71c63cb595fde7c951aadb31c3dbebc (patch) | |
tree | 3603f88e1b3bd1e622edb182cccd882dd31ddc8a /sql/partition_info.cc | |
parent | f271100836d8a91a775894ec36b869a66a3145e5 (diff) | |
download | mariadb-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 'sql/partition_info.cc')
-rw-r--r-- | sql/partition_info.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 636e0db437a..5939da09eae 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -145,8 +145,7 @@ partition_info *partition_info::get_clone(THD *thd) @retval false Partition not found */ -bool partition_info::add_named_partition(const char *part_name, - uint length) +bool partition_info::add_named_partition(const char *part_name, size_t length) { HASH *part_name_hash; PART_NAME_DEF *part_def; @@ -197,8 +196,7 @@ bool partition_info::add_named_partition(const char *part_name, @param part_elem Partition element that matched. */ -bool partition_info::set_named_partition_bitmap(const char *part_name, - uint length) +bool partition_info::set_named_partition_bitmap(const char *part_name, size_t length) { DBUG_ENTER("partition_info::set_named_partition_bitmap"); bitmap_clear_all(&read_partitions); @@ -419,7 +417,7 @@ char *partition_info::create_default_partition_names(THD *thd, uint part_no, char *partition_info::create_default_subpartition_name(THD *thd, uint subpart_no, const char *part_name) { - uint size_alloc= strlen(part_name) + MAX_PART_NAME_SIZE; + size_t size_alloc= strlen(part_name) + MAX_PART_NAME_SIZE; char *ptr= (char*) thd->calloc(size_alloc); DBUG_ENTER("create_default_subpartition_name"); |