mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#45288: pb2 returns a lot of compilation warnings on linux
Fix warnings flagged by the new warning option -Wunused-but-set-variable that was added to GCC 4.6 and that is enabled by -Wunused and -Wall. The option causes a warning whenever a local variable is assigned to but is later unused. It also warns about meaningless pointer dereferences.
This commit is contained in:
@ -128,6 +128,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
||||
bool is_fifo=0;
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
LOAD_FILE_INFO lf_info;
|
||||
THD::killed_state killed_status;
|
||||
#endif
|
||||
char *db = table_list->db; // This is never null
|
||||
/*
|
||||
@ -138,7 +139,6 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
||||
char *tdb= thd->db ? thd->db : db; // Result is never null
|
||||
ulong skip_lines= ex->skip_lines;
|
||||
bool transactional_table;
|
||||
THD::killed_state killed_status= THD::NOT_KILLED;
|
||||
DBUG_ENTER("mysql_load");
|
||||
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
@ -455,7 +455,11 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
||||
error=1;
|
||||
thd->killed= THD::KILL_QUERY;
|
||||
};);
|
||||
killed_status= (error == 0)? THD::NOT_KILLED : thd->killed;
|
||||
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
killed_status= (error == 0) ? THD::NOT_KILLED : thd->killed;
|
||||
#endif
|
||||
|
||||
/*
|
||||
We must invalidate the table in query cache before binlog writing and
|
||||
ha_autocommit_...
|
||||
@ -708,12 +712,9 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
|
||||
List_iterator_fast<Item> it(fields_vars);
|
||||
Item_field *sql_field;
|
||||
TABLE *table= table_list->table;
|
||||
ulonglong id;
|
||||
bool err;
|
||||
DBUG_ENTER("read_fixed_length");
|
||||
|
||||
id= 0;
|
||||
|
||||
while (!read_info.read_fixed_length())
|
||||
{
|
||||
if (thd->killed)
|
||||
@ -839,12 +840,10 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
|
||||
Item *item;
|
||||
TABLE *table= table_list->table;
|
||||
uint enclosed_length;
|
||||
ulonglong id;
|
||||
bool err;
|
||||
DBUG_ENTER("read_sep_field");
|
||||
|
||||
enclosed_length=enclosed.length();
|
||||
id= 0;
|
||||
|
||||
for (;;it.rewind())
|
||||
{
|
||||
|
Reference in New Issue
Block a user