summaryrefslogtreecommitdiff
path: root/storage/myisammrg
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-07-20 15:07:36 -0300
committerDavi Arnaut <davi.arnaut@oracle.com>2010-07-20 15:07:36 -0300
commitc96b249fc3912f7a86f885cc62da1a3eeed537c6 (patch)
tree3be217b0b2b0e9c76e6f41abe8c7fa3aeb35d373 /storage/myisammrg
parentd676c3ff0eef8613ac689df8ed07ecdd0a39817b (diff)
downloadmariadb-git-c96b249fc3912f7a86f885cc62da1a3eeed537c6.tar.gz
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.
Diffstat (limited to 'storage/myisammrg')
-rw-r--r--storage/myisammrg/myrg_open.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/storage/myisammrg/myrg_open.c b/storage/myisammrg/myrg_open.c
index 5fcbe0c3297..18f8aa8d2c0 100644
--- a/storage/myisammrg/myrg_open.c
+++ b/storage/myisammrg/myrg_open.c
@@ -227,9 +227,7 @@ MYRG_INFO *myrg_parent_open(const char *parent_name,
int save_errno;
int insert_method;
uint length;
- uint dir_length;
uint child_count;
- size_t name_buff_length;
File fd;
IO_CACHE file_cache;
char parent_name_buff[FN_REFLEN * 2];
@@ -299,7 +297,6 @@ MYRG_INFO *myrg_parent_open(const char *parent_name,
}
/* Call callback for each child. */
- dir_length= dirname_part(parent_name_buff, parent_name, &name_buff_length);
my_b_seek(&file_cache, 0);
while ((length= my_b_gets(&file_cache, child_name_buff, FN_REFLEN - 1)))
{
@@ -379,7 +376,6 @@ int myrg_attach_children(MYRG_INFO *m_info, int handle_locking,
{
ulonglong file_offset;
MI_INFO *myisam;
- int rc;
int errpos;
int save_errno;
uint idx;
@@ -398,7 +394,6 @@ int myrg_attach_children(MYRG_INFO *m_info, int handle_locking,
here and in ha_myisammrg::store_lock() forces consistent data.
*/
pthread_mutex_lock(&m_info->mutex);
- rc= 1;
errpos= 0;
file_offset= 0;
min_keys= 0;