summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-03-28 20:04:14 +0100
committerSergei Golubchik <sergii@pisem.net>2013-03-28 20:04:14 +0100
commit2901497b187ffcefbec73c4ac9b5270174e8682c (patch)
tree7546fe994305164a171948be01d7a261427b47d6 /storage
parent78683672707bad90169b68b4c5d8aadc0e895f3d (diff)
downloadmariadb-git-2901497b187ffcefbec73c4ac9b5270174e8682c.tar.gz
MDEV-4243 Warnings/errors while compiling with clang
Diffstat (limited to 'storage')
-rw-r--r--storage/csv/ha_tina.cc6
-rw-r--r--storage/federatedx/ha_federatedx.cc2
-rw-r--r--storage/innobase/sync/sync0sync.c4
-rw-r--r--storage/maria/ma_bitmap.c11
-rw-r--r--storage/maria/ma_blockrec.c2
-rw-r--r--storage/maria/ma_test3.c2
-rw-r--r--storage/xtradb/sync/sync0sync.c4
7 files changed, 13 insertions, 18 deletions
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index d31e5ee8d89..54a85ec3a44 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -1436,9 +1436,9 @@ int ha_tina::rnd_end()
DBUG_RETURN(-1);
/* Open the file again */
- if (((data_file= mysql_file_open(csv_key_file_data,
- share->data_file_name,
- O_RDONLY, MYF(MY_WME))) == -1))
+ if ((data_file= mysql_file_open(csv_key_file_data,
+ share->data_file_name,
+ O_RDONLY, MYF(MY_WME))) == -1)
DBUG_RETURN(my_errno ? my_errno : -1);
/*
As we reopened the data file, increase share->data_file_version
diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc
index a10285a81aa..f6d9b3a4014 100644
--- a/storage/federatedx/ha_federatedx.cc
+++ b/storage/federatedx/ha_federatedx.cc
@@ -764,7 +764,7 @@ static int parse_url(MEM_ROOT *mem_root, FEDERATEDX_SHARE *share, TABLE *table,
user:@hostname:port/db/table
Then password is a null string, so set to NULL
*/
- if ((share->password[0] == '\0'))
+ if (share->password[0] == '\0')
share->password= NULL;
}
diff --git a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c
index fb7101fdb8d..fba43ad859c 100644
--- a/storage/innobase/sync/sync0sync.c
+++ b/storage/innobase/sync/sync0sync.c
@@ -316,9 +316,9 @@ mutex_create_func(
/* NOTE! The very first mutexes are not put to the mutex list */
- if ((mutex == &mutex_list_mutex)
+ if (mutex == &mutex_list_mutex
#ifdef UNIV_SYNC_DEBUG
- || (mutex == &sync_thread_mutex)
+ || mutex == &sync_thread_mutex
#endif /* UNIV_SYNC_DEBUG */
) {
diff --git a/storage/maria/ma_bitmap.c b/storage/maria/ma_bitmap.c
index f5d32d6a191..407b4ed2b92 100644
--- a/storage/maria/ma_bitmap.c
+++ b/storage/maria/ma_bitmap.c
@@ -135,8 +135,7 @@ const char *bits_to_txt[]=
"tail 00-40 % full", "tail 40-80 % full", "tail/blob full"
};
-/*#define WRONG_BITMAP_FLUSH 1*/ /*define only for provoking bugs*/
-#undef WRONG_BITMAP_FLUSH
+#define WRONG_BITMAP_FLUSH 0 /*define to 1 only for provoking bugs*/
static my_bool _ma_read_bitmap_page(MARIA_HA *info,
MARIA_FILE_BITMAP *bitmap,
@@ -164,11 +163,7 @@ static inline my_bool write_changed_bitmap(MARIA_SHARE *share,
*/
bitmap->changed_not_flushed= 1;
- if ((bitmap->non_flushable == 0)
-#ifdef WRONG_BITMAP_FLUSH
- || 1
-#endif
- )
+ if ((bitmap->non_flushable == 0) || WRONG_BITMAP_FLUSH)
{
res= pagecache_write(share->pagecache,
&bitmap->file, bitmap->page, 0,
@@ -495,7 +490,7 @@ my_bool _ma_bitmap_flush_all(MARIA_SHARE *share)
{
bitmap->flush_all_requested++;
bitmap->waiting_for_non_flushable++;
-#ifndef WRONG_BITMAP_FLUSH
+#if !WRONG_BITMAP_FLUSH
while (bitmap->non_flushable > 0)
{
DBUG_PRINT("info", ("waiting for bitmap to be flushable"));
diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c
index 71faa11fd2b..622d2581cc9 100644
--- a/storage/maria/ma_blockrec.c
+++ b/storage/maria/ma_blockrec.c
@@ -7123,7 +7123,7 @@ my_bool _ma_apply_undo_row_delete(MARIA_HA *info, LSN undo_lsn,
memcpy(field_pos, field_length_data, size_length);
field_length_data+= size_length;
- memcpy(field_pos + size_length, &header, sizeof(&header));
+ memcpy(field_pos + size_length, &header, sizeof(header));
header+= blob_length;
*blob_lengths++= blob_length;
break;
diff --git a/storage/maria/ma_test3.c b/storage/maria/ma_test3.c
index c11de6f8242..64b22e45c1b 100644
--- a/storage/maria/ma_test3.c
+++ b/storage/maria/ma_test3.c
@@ -114,7 +114,7 @@ int main(int argc,char **argv)
sleep(1);
return 0;
}
- rnd(1);
+ (void)rnd(1);
}
for (i=0 ; i < forks ; i++)
diff --git a/storage/xtradb/sync/sync0sync.c b/storage/xtradb/sync/sync0sync.c
index efc43c4cbe5..25f96d9817a 100644
--- a/storage/xtradb/sync/sync0sync.c
+++ b/storage/xtradb/sync/sync0sync.c
@@ -315,9 +315,9 @@ mutex_create_func(
/* NOTE! The very first mutexes are not put to the mutex list */
- if ((mutex == &mutex_list_mutex)
+ if (mutex == &mutex_list_mutex
#ifdef UNIV_SYNC_DEBUG
- || (mutex == &sync_thread_mutex)
+ || mutex == &sync_thread_mutex
#endif /* UNIV_SYNC_DEBUG */
) {