Commit 9990027f authored by Michael Widenius's avatar Michael Widenius

Fixed compiler warnings from optimized builds

parent ce069900
......@@ -4908,8 +4908,8 @@ int reinit_ssl()
ssl_acceptor_fd= new_fd;
ssl_acceptor_stats.init();
mysql_rwlock_unlock(&LOCK_ssl_refresh);
return 0;
#endif
return 0;
}
static void end_ssl()
......
......@@ -319,9 +319,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
DBUG_RETURN(true);
}
TABLE *table= table_list->table;
DBUG_ASSERT(table);
DBUG_ASSERT(table_list->table);
DBUG_ASSERT(!conds || thd->stmt_arena->is_stmt_execute());
// conds could be cached from previous SP call
......
......@@ -9342,7 +9342,7 @@ bool LEX::parsed_insert_select(SELECT_LEX *first_select)
return true;
// fix "main" select
SELECT_LEX *blt= pop_select();
SELECT_LEX *blt __attribute__((unused))= pop_select();
DBUG_ASSERT(blt == &builtin_select);
push_select(first_select);
return false;
......
......@@ -3438,12 +3438,14 @@ struct LEX: public Query_tables_list
void pop_context()
{
DBUG_ENTER("LEX::pop_context");
#ifndef DBUG_OFF
Name_resolution_context *context= context_stack.pop();
DBUG_PRINT("info", ("Pop context %p Select: %p (%d)",
context, context->select_lex,
(context->select_lex ?
context->select_lex->select_number:
0)));
#endif
DBUG_VOID_RETURN;
}
......
......@@ -526,7 +526,7 @@ BOOL PlugSubSet(void *memp, uint size)
/***********************************************************************/
/* Use it to export a function that do throwing. */
/***********************************************************************/
void *DoThrow(int n)
static void *DoThrow(int n)
{
throw n;
} /* end of DoThrow */
......
......@@ -167,7 +167,7 @@ to instant->dropped[]
template<bool replace_dropped>
inline void dict_table_t::init_instant(const dict_table_t& table)
{
const dict_index_t& oindex = *table.indexes.start;
const dict_index_t& oindex __attribute__((unused))= *table.indexes.start;
dict_index_t& index = *indexes.start;
const unsigned u = index.first_user_field();
DBUG_ASSERT(u == oindex.first_user_field());
......@@ -785,9 +785,9 @@ inline void dict_table_t::rollback_instant(
index->get_n_nullable(index->n_core_fields));
const dict_col_t* const new_cols = cols;
const dict_col_t* const new_cols_end = cols + n_cols;
const dict_col_t* const new_cols_end __attribute__((unused)) = cols + n_cols;
const dict_v_col_t* const new_v_cols = v_cols;
const dict_v_col_t* const new_v_cols_end = v_cols + n_v_cols;
const dict_v_col_t* const new_v_cols_end __attribute__((unused))= v_cols + n_v_cols;
cols = old_cols;
col_names = old_col_names;
......
......@@ -32,7 +32,7 @@ static int create_test_table(const char *table_name, int stage);
static int copy_table(const char *table_name, int stage);
static void create_record(uchar *record,uint rownr);
int main(int argc,char *argv[])
int main(int argc __attribute__((unused)), char *argv[])
{
int error= 1;
int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment