summaryrefslogtreecommitdiff
path: root/storage/maria
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 /storage/maria
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 'storage/maria')
-rw-r--r--storage/maria/ma_blockrec.c2
-rw-r--r--storage/maria/ma_check.c3
-rw-r--r--storage/maria/ma_loghandler.c2
-rw-r--r--storage/maria/ma_recovery.c2
4 files changed, 5 insertions, 4 deletions
diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c
index c7c1a131441..71bbb389ca2 100644
--- a/storage/maria/ma_blockrec.c
+++ b/storage/maria/ma_blockrec.c
@@ -3676,7 +3676,7 @@ static my_bool _ma_update_block_record2(MARIA_HA *info,
MARIA_PINNED_PAGE page_link;
uint rownr, org_empty_size, head_length;
uint block_size= info->s->block_size;
- uint errpos= 0;
+ uint errpos __attribute__((unused)) = 0;
uchar *dir;
pgcache_page_no_t page;
struct st_row_pos_info row_pos;
diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c
index 9f3c9059397..9ce8e42cae0 100644
--- a/storage/maria/ma_check.c
+++ b/storage/maria/ma_check.c
@@ -3884,7 +3884,8 @@ int maria_repair_by_sort(HA_CHECK *param, register MARIA_HA *info,
_ma_check_print_error(param,
"Rows lost (Found %lu of %lu); Aborting "
"because safe repair was requested",
- sort_info.new_info->s->state.state.records,
+ (ulong) sort_info.new_info->s->
+ state.state.records,
(ulong) start_records);
share->state.state.records=start_records;
goto err;
diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c
index ce7253d4c39..709bcd26e6a 100644
--- a/storage/maria/ma_loghandler.c
+++ b/storage/maria/ma_loghandler.c
@@ -3201,7 +3201,7 @@ static uint16 translog_get_chunk_header_length(uchar *chunk)
case TRANSLOG_CHUNK_LSN:
{
/* 0 chunk referred as LSN (head or tail) */
- translog_size_t rec_len;
+ translog_size_t rec_len __attribute__((unused));
uchar *start= chunk;
uchar *ptr= start + 1 + 2;
uint16 chunk_len, header_len;
diff --git a/storage/maria/ma_recovery.c b/storage/maria/ma_recovery.c
index 73ecb208662..ccd9af612be 100644
--- a/storage/maria/ma_recovery.c
+++ b/storage/maria/ma_recovery.c
@@ -2884,7 +2884,7 @@ static uint end_of_redo_phase(my_bool prepare_for_undo_phase)
static int run_undo_phase(uint uncommitted)
{
- LSN last_undo;
+ LSN last_undo __attribute__((unused));
DBUG_ENTER("run_undo_phase");
if (uncommitted > 0)