summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-11-30 00:34:05 +0200
committerMichael Widenius <monty@askmonty.org>2011-11-30 00:34:05 +0200
commit47575bd0e05d49955a4d7f46409cc6316fed8d7c (patch)
treec03da6793450dadab5b254ce0b53eacc29243706 /sql
parenta19f4e3a3af4c18ec89f8f8a4ae32e3c7d7fec70 (diff)
downloadmariadb-git-47575bd0e05d49955a4d7f46409cc6316fed8d7c.tar.gz
Fixed compiler warnings
dbug/tests.c: Added __attribute__((unused)) to get rid of compiler warning server-tools/instance-manager/guardian.cc: Added __attribute__((unused)) to get rid of compiler warning sql/filesort.cc: Added __attribute__((unused)) to get rid of compiler warning sql/slave.cc: Added __attribute__((unused)) to get rid of compiler warning sql/sql_load.cc: Added __attribute__((unused)) to get rid of compiler warning sql/sql_table.cc: Added __attribute__((unused)) to get rid of compiler warning storage/maria/ma_blockrec.c: Added __attribute__((unused)) to get rid of compiler warning storage/maria/ma_check.c: Added missing cast storage/maria/ma_loghandler.c: Added __attribute__((unused)) to get rid of compiler warning storage/maria/ma_recovery.c: Added __attribute__((unused)) to get rid of compiler warning storage/pbxt/src/cache_xt.cc: Added __attribute__((unused)) to get rid of compiler warning storage/xtradb/fil/fil0fil.c: Removed not used variable storage/xtradb/handler/ha_innodb.cc: Use unused variable vio/viosocket.c: Remove usage of not used variable vio/viosslfactories.c: Added cast
Diffstat (limited to 'sql')
-rw-r--r--sql/filesort.cc2
-rw-r--r--sql/slave.cc2
-rw-r--r--sql/sql_load.cc2
-rw-r--r--sql/sql_table.cc2
4 files changed, 4 insertions, 4 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc
index e95ff08fcdd..54b41531cdd 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -827,7 +827,7 @@ static void make_sortkey(register SORTPARAM *param,
if (sort_field->need_strxnfrm)
{
char *from=(char*) res->ptr();
- uint tmp_length;
+ uint tmp_length __attribute__((unused));
if ((uchar*) from == to)
{
set_if_smaller(length,sort_field->length);
diff --git a/sql/slave.cc b/sql/slave.cc
index d779d8cdc9e..1971001d759 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -513,7 +513,7 @@ terminate_slave_thread(THD *thd,
while (*slave_running) // Should always be true
{
- int error;
+ int error __attribute__((unused));
DBUG_PRINT("loop", ("killing slave thread"));
pthread_mutex_lock(&thd->LOCK_thd_data);
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 23105d84a9d..42e4489cb07 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -140,7 +140,7 @@ 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;
+ bool transactional_table __attribute__((unused));
DBUG_ENTER("mysql_load");
/*
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 7328157182d..465404d32d2 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -6619,7 +6619,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
uint fast_alter_partition= 0;
bool partition_changed= FALSE;
#endif
- bool need_lock_for_indexes= TRUE;
+ bool need_lock_for_indexes __attribute__((unused)) = TRUE;
KEY *key_info_buffer;
uint index_drop_count= 0;
uint *index_drop_buffer= NULL;