mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
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.
This commit is contained in:
@@ -262,7 +262,7 @@ static char *convert_path(const char *argument)
|
||||
/* Convert / to \\ to make Windows paths */
|
||||
char *winfilename= my_strdup(argument, MYF(MY_FAE));
|
||||
char *pos, *end;
|
||||
int length= strlen(argument);
|
||||
size_t length= strlen(argument);
|
||||
|
||||
for (pos= winfilename, end= pos+length ; pos < end ; pos++)
|
||||
{
|
||||
@@ -712,11 +712,11 @@ static int check_options(int argc, char **argv, char *operation)
|
||||
|
||||
/* Form prefix strings for the options. */
|
||||
const char *basedir_prefix = "--basedir=";
|
||||
int basedir_len= strlen(basedir_prefix);
|
||||
size_t basedir_len= strlen(basedir_prefix);
|
||||
const char *datadir_prefix = "--datadir=";
|
||||
int datadir_len= strlen(datadir_prefix);
|
||||
size_t datadir_len= strlen(datadir_prefix);
|
||||
const char *plugin_dir_prefix = "--plugin_dir=";
|
||||
int plugin_dir_len= strlen(plugin_dir_prefix);
|
||||
size_t plugin_dir_len= strlen(plugin_dir_prefix);
|
||||
|
||||
strcpy(plugin_name, "");
|
||||
for (i = 0; i < argc && num_found < 5; i++)
|
||||
|
Reference in New Issue
Block a user