From 6c279ad6a71c63cb595fde7c951aadb31c3dbebc Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 6 Feb 2018 12:55:58 +0000 Subject: 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. --- sql/sql_profile.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sql/sql_profile.cc') diff --git a/sql/sql_profile.cc b/sql/sql_profile.cc index c1a13ebd210..13f03fed5f3 100644 --- a/sql/sql_profile.cc +++ b/sql/sql_profile.cc @@ -284,11 +284,10 @@ QUERY_PROFILE::~QUERY_PROFILE() /** @todo Provide a way to include the full text, as in SHOW PROCESSLIST. */ -void QUERY_PROFILE::set_query_source(char *query_source_arg, - uint query_length_arg) +void QUERY_PROFILE::set_query_source(char *query_source_arg, size_t query_length_arg) { /* Truncate to avoid DoS attacks. */ - uint length= MY_MIN(MAX_QUERY_LENGTH, query_length_arg); + size_t length= MY_MIN(MAX_QUERY_LENGTH, query_length_arg); DBUG_ASSERT(query_source == NULL); /* we don't leak memory */ if (query_source_arg != NULL) -- cgit v1.2.1