mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
cmake: re-enable -Werror in the maintainer mode
now we can afford it. Fix -Werror errors. Note: * old gcc is bad at detecting uninit variables, disable it. * time_t is int or long, cast it for printf's
This commit is contained in:
@ -1354,7 +1354,7 @@ unpack_fields(MYSQL *mysql, MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
|
||||
{
|
||||
uchar *pos;
|
||||
/* fields count may be wrong */
|
||||
if (field - result >= fields)
|
||||
if (field - result >= (my_ptrdiff_t)fields)
|
||||
goto err;
|
||||
|
||||
cli_fetch_lengths(&lengths[0], row->data, default_value ? 8 : 7);
|
||||
@ -1401,7 +1401,7 @@ unpack_fields(MYSQL *mysql, MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
|
||||
/* old protocol, for backward compatibility */
|
||||
for (row=data->data; row ; row = row->next,field++)
|
||||
{
|
||||
if (field - result >= fields)
|
||||
if (field - result >= (my_ptrdiff_t)fields)
|
||||
goto err;
|
||||
cli_fetch_lengths(&lengths[0], row->data, default_value ? 6 : 5);
|
||||
field->org_table= field->table= strdup_root(alloc,(char*) row->data[0]);
|
||||
@ -1439,7 +1439,7 @@ unpack_fields(MYSQL *mysql, MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
|
||||
}
|
||||
}
|
||||
#endif /* DELETE_SUPPORT_OF_4_0_PROTOCOL */
|
||||
if (field - result < fields)
|
||||
if (field - result < (my_ptrdiff_t)fields)
|
||||
goto err;
|
||||
free_rows(data); /* Free old data */
|
||||
DBUG_RETURN(result);
|
||||
|
Reference in New Issue
Block a user