mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +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:
@@ -661,7 +661,7 @@ static int
|
||||
list_table_status(MYSQL *mysql,const char *db,const char *wild)
|
||||
{
|
||||
char query[NAME_LEN + 100];
|
||||
int len;
|
||||
size_t len;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
|
||||
@@ -908,7 +908,7 @@ static void print_res_header(MYSQL_RES *result)
|
||||
|
||||
static void print_res_top(MYSQL_RES *result)
|
||||
{
|
||||
uint i,length;
|
||||
size_t i,length;
|
||||
MYSQL_FIELD *field;
|
||||
|
||||
putchar('+');
|
||||
@@ -916,7 +916,7 @@ static void print_res_top(MYSQL_RES *result)
|
||||
while((field = mysql_fetch_field(result)))
|
||||
{
|
||||
if ((length= strlen(field->name)) > field->max_length)
|
||||
field->max_length=length;
|
||||
field->max_length=(ulong)length;
|
||||
else
|
||||
length=field->max_length;
|
||||
for (i=length+2 ; i--> 0 ; )
|
||||
|
Reference in New Issue
Block a user