summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2011-10-27 19:18:25 +0300
committerunknown <sanja@askmonty.org>2011-10-27 19:18:25 +0300
commit26387734fd16e45333b26dabb78740473052cb36 (patch)
tree9d5bc36a3224ea703a4abb6eff7c84e6583722bf /storage
parentdd564da398d1a7f251ab75be2870c6a5f307b343 (diff)
downloadmariadb-git-26387734fd16e45333b26dabb78740473052cb36.tar.gz
Fix gcc 4.6 warning after merge with 5.1
Diffstat (limited to 'storage')
-rw-r--r--storage/maria/ma_blockrec.c2
-rw-r--r--storage/maria/ma_dynrec.c10
-rw-r--r--storage/sphinx/ha_sphinx.cc2
3 files changed, 10 insertions, 4 deletions
diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c
index 6165e211566..74898d981e9 100644
--- a/storage/maria/ma_blockrec.c
+++ b/storage/maria/ma_blockrec.c
@@ -5342,7 +5342,6 @@ int _ma_scan_block_record(MARIA_HA *info, uchar *record,
my_bool skip_deleted __attribute__ ((unused)))
{
uint block_size;
- my_off_t filepos;
MARIA_SHARE *share= info->s;
DBUG_ENTER("_ma_scan_block_record");
@@ -5472,7 +5471,6 @@ restart_bitmap_scan:
/* Read next bitmap */
info->scan.bitmap_page+= share->bitmap.pages_covered;
- filepos= (my_off_t) info->scan.bitmap_page * block_size;
if (unlikely(info->scan.bitmap_page >= info->scan.max_page))
{
DBUG_PRINT("info", ("Found end of file"));
diff --git a/storage/maria/ma_dynrec.c b/storage/maria/ma_dynrec.c
index a88ef3bc3ba..200c6415086 100644
--- a/storage/maria/ma_dynrec.c
+++ b/storage/maria/ma_dynrec.c
@@ -1741,14 +1741,20 @@ int _ma_read_rnd_dynamic_record(MARIA_HA *info,
MARIA_RECORD_POS filepos,
my_bool skip_deleted_blocks)
{
- int block_of_record, info_read;
+ int block_of_record;
+#ifdef MARIA_EXTERNAL_LOCKING
+ int info_read;
+#endif
+
uint left_len,b_type;
uchar *to;
MARIA_BLOCK_INFO block_info;
MARIA_SHARE *share= info->s;
DBUG_ENTER("_ma_read_rnd_dynamic_record");
+#ifdef MARIA_EXTERNAL_LOCKING
info_read=0;
+#endif
LINT_INIT(to);
if (info->lock_type == F_UNLCK)
@@ -1758,8 +1764,10 @@ int _ma_read_rnd_dynamic_record(MARIA_HA *info,
info->tmp_lock_type=F_RDLCK;
#endif
}
+#ifdef MARIA_EXTERNAL_LOCKING
else
info_read=1; /* memory-keyinfoblock is ok */
+#endif
block_of_record= 0; /* First block of record is numbered as zero. */
block_info.second_read= 0;
diff --git a/storage/sphinx/ha_sphinx.cc b/storage/sphinx/ha_sphinx.cc
index 6f4f12a318c..0d9f3a381c0 100644
--- a/storage/sphinx/ha_sphinx.cc
+++ b/storage/sphinx/ha_sphinx.cc
@@ -703,7 +703,7 @@ static int sphinx_done_func ( void * )
pthread_mutex_destroy ( &sphinx_mutex );
}
- SPH_RET(0);
+ SPH_RET(error);
}