summaryrefslogtreecommitdiff
path: root/storage/heap
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2009-11-24 16:54:59 +0300
committerKonstantin Osipov <kostja@sun.com>2009-11-24 16:54:59 +0300
commit4cff617c2541279a53b92acbd4e4d8716dc54873 (patch)
tree887f74eb880e4d9ff8b76ff93b221f7e6ec7fbe8 /storage/heap
parent26cd9abe4fcc058004ad8e656ff5b6713c0118f4 (diff)
downloadmariadb-git-4cff617c2541279a53b92acbd4e4d8716dc54873.tar.gz
Backport of:
---------------------------------------------------------------------- ChangeSet@1.2571, 2008-04-08 12:30:06+02:00, vvaintroub@wva. +122 -0 Bug#32082 : definition of VOID in my_global.h conflicts with Windows SDK headers VOID macro is now removed. Its usage is replaced with void cast. In some cases, where cast does not make much sense (pthread_*, printf, hash_delete, my_seek), cast is ommited.
Diffstat (limited to 'storage/heap')
-rw-r--r--storage/heap/hp_clear.c6
-rw-r--r--storage/heap/hp_create.c4
-rw-r--r--storage/heap/hp_test1.c2
-rw-r--r--storage/heap/hp_test2.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/storage/heap/hp_clear.c b/storage/heap/hp_clear.c
index babfcbd6f41..9c04684e269 100644
--- a/storage/heap/hp_clear.c
+++ b/storage/heap/hp_clear.c
@@ -31,8 +31,8 @@ void hp_clear(HP_SHARE *info)
DBUG_ENTER("hp_clear");
if (info->block.levels)
- VOID(hp_free_level(&info->block,info->block.levels,info->block.root,
- (uchar*) 0));
+ (void) hp_free_level(&info->block,info->block.levels,info->block.root,
+ (uchar*) 0);
info->block.levels=0;
hp_clear_keys(info);
info->records= info->deleted= 0;
@@ -94,7 +94,7 @@ void hp_clear_keys(HP_SHARE *info)
{
HP_BLOCK *block= &keyinfo->block;
if (block->levels)
- VOID(hp_free_level(block,block->levels,block->root,(uchar*) 0));
+ (void) hp_free_level(block,block->levels,block->root,(uchar*) 0);
block->levels=0;
block->last_allocated=0;
keyinfo->hash_buckets= 0;
diff --git a/storage/heap/hp_create.c b/storage/heap/hp_create.c
index b6814fc1614..1440cbc0e98 100644
--- a/storage/heap/hp_create.c
+++ b/storage/heap/hp_create.c
@@ -194,7 +194,7 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef,
}
#ifdef THREAD
thr_lock_init(&share->lock);
- VOID(pthread_mutex_init(&share->intern_lock,MY_MUTEX_INIT_FAST));
+ pthread_mutex_init(&share->intern_lock,MY_MUTEX_INIT_FAST);
#endif
if (!create_info->internal_table)
{
@@ -298,7 +298,7 @@ void hp_free(HP_SHARE *share)
hp_clear(share); /* Remove blocks from memory */
#ifdef THREAD
thr_lock_delete(&share->lock);
- VOID(pthread_mutex_destroy(&share->intern_lock));
+ pthread_mutex_destroy(&share->intern_lock);
#endif
my_free((uchar*) share->name, MYF(0));
my_free((uchar*) share, MYF(0));
diff --git a/storage/heap/hp_test1.c b/storage/heap/hp_test1.c
index b1b55098a78..911e3a285a2 100644
--- a/storage/heap/hp_test1.c
+++ b/storage/heap/hp_test1.c
@@ -91,7 +91,7 @@ int main(int argc, char **argv)
printf("- Removing records\n");
for (i=1 ; i<=10 ; i++)
{
- if (i == remove_ant) { VOID(heap_close(file)) ; return (0) ; }
+ if (i == remove_ant) { (void) heap_close(file); return (0) ; }
sprintf((char*) key,"%6d",(j=(int) ((rand() & 32767)/32767.*25)));
if ((error = heap_rkey(file,record,0,key,6,HA_READ_KEY_EXACT)))
{
diff --git a/storage/heap/hp_test2.c b/storage/heap/hp_test2.c
index 5c548b6be74..8216c7360b4 100644
--- a/storage/heap/hp_test2.c
+++ b/storage/heap/hp_test2.c
@@ -609,7 +609,7 @@ end:
return(0);
err:
printf("Got error: %d when using heap-database\n",my_errno);
- VOID(heap_close(file));
+ (void) heap_close(file);
return(1);
} /* main */