1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix and reenable Windows compiler warning C4800 (size_t conversion).

This commit is contained in:
Vladislav Vaintroub
2018-01-12 18:25:02 +00:00
parent 859d100d70
commit 9891ee5a2a
24 changed files with 72 additions and 72 deletions

View File

@ -82,14 +82,14 @@ int read_bootstrap_query(char *query, int *query_length,
*/
if (query_len + len + 1 >= MAX_BOOTSTRAP_QUERY_SIZE)
{
int new_len= MAX_BOOTSTRAP_QUERY_SIZE - query_len - 1;
size_t new_len= MAX_BOOTSTRAP_QUERY_SIZE - query_len - 1;
if ((new_len > 0) && (query_len < MAX_BOOTSTRAP_QUERY_SIZE))
{
memcpy(query + query_len, line, new_len);
query_len+= new_len;
}
query[query_len]= '\0';
*query_length= query_len;
*query_length= (int)query_len;
return READ_BOOTSTRAP_QUERY_SIZE;
}
@ -111,7 +111,7 @@ int read_bootstrap_query(char *query, int *query_length,
Return the query found.
*/
query[query_len]= '\0';
*query_length= query_len;
*query_length= (int)query_len;
return READ_BOOTSTRAP_SUCCESS;
}
}