summaryrefslogtreecommitdiff
path: root/storage/myisam/myisamlog.c
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
commit9a9e8d2311c9d2bbe8bd31165e916da36e0ffb31 (patch)
tree887f74eb880e4d9ff8b76ff93b221f7e6ec7fbe8 /storage/myisam/myisamlog.c
parente46eaca0f548c1e24e51e601c594f1a4169e077e (diff)
downloadmariadb-git-9a9e8d2311c9d2bbe8bd31165e916da36e0ffb31.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. client/mysqladmin.cc: Bug#32082 : remove VOID macro client/mysqldump.c: Bug#32082 : remove VOID macro client/mysqlimport.c: Bug#32082 : remove VOID macro client/mysqlslap.c: Bug#32082 : remove VOID macro client/mysqltest.cc: Bug#32082 : remove VOID macro client/sql_string.cc: Bug#32082 : remove VOID macro extra/comp_err.c: Bug#32082 : remove VOID macro extra/replace.c: Bug#32082 : remove VOID macro include/my_alarm.h: Bug#32082 : remove VOID macro include/my_global.h: Bug#32082 : remove VOID macro libmysql/libmysql.c: Bug#32082 : remove VOID macro mysys/errors.c: Bug#32082 : remove VOID macro mysys/hash.c: Bug#32082 : remove VOID macro mysys/mf_iocache2.c: Bug#32082 : remove VOID macro mysys/mf_loadpath.c: Bug#32082 : remove VOID macro mysys/mf_path.c: Bug#32082 : remove VOID macro mysys/my_append.c: Bug#32082 : remove VOID macro mysys/my_clock.c: Bug#32082 : remove VOID macro mysys/my_copy.c: Bug#32082 : remove VOID macro mysys/my_fstream.c: Bug#32082 : remove VOID macro mysys/my_getwd.c: Bug#32082 : remove VOID macro mysys/my_lib.c: Bug#32082 : remove VOID macro mysys/my_lockmem.c: Bug#32082 : remove VOID macro mysys/my_pthread.c: Bug#32082 : remove VOID macro mysys/my_redel.c: Bug#32082 : remove VOID macro mysys/stacktrace.c: Bug#32082 : remove VOID macro mysys/thr_alarm.c: Bug#32082 : remove VOID macro mysys/thr_lock.c: Bug#32082 : remove VOID macro sql/derror.cc: Bug#32082 : remove VOID macro sql/des_key_file.cc: Bug#32082 : remove VOID macro sql/discover.cc: Bug#32082 : remove VOID macro sql/field.cc: Bug#32082 : remove VOID macro sql/filesort.cc: Bug#32082 : remove VOID macro sql/ha_ndbcluster.cc: Bug#32082 : remove VOID macro sql/ha_partition.cc: Bug#32082 : remove VOID macro sql/handler.cc: Bug#32082 : remove VOID macro sql/hostname.cc: Bug#32082 : remove VOID macro sql/init.cc: Bug#32082 : remove VOID macro sql/item.cc: Bug#32082 : remove VOID macro sql/item_cmpfunc.cc: Bug#32082 : remove VOID macro sql/item_strfunc.cc: Bug#32082 : remove VOID macro sql/lock.cc: Bug#32082 : remove VOID macro sql/log.cc: Bug#32082 : remove VOID macro sql/log_event.cc: Bug#32082 : remove VOID macro sql/mysqld.cc: Bug#32082 : remove VOID macro sql/opt_range.h: Bug#32082 : remove VOID macro sql/protocol.cc: Bug#32082 : remove VOID macro sql/records.cc: Bug#32082 : remove VOID macro sql/sp_head.cc: Bug#32082 : remove VOID macro sql/sp_pcontext.cc: Bug#32082 : remove VOID macro sql/sql_acl.cc: Bug#32082 : remove VOID macro sql/sql_base.cc: Bug#32082 : remove VOID macro sql/sql_cache.cc: Bug#32082 : remove VOID macro sql/sql_connect.cc: Bug#32082 : remove VOID macro sql/sql_db.cc: Bug#32082 : remove VOID macro sql/sql_delete.cc: Bug#32082 : remove VOID macro sql/sql_handler.cc: Bug#32082 : remove VOID macro sql/sql_insert.cc: Bug#32082 : remove VOID macro sql/sql_map.cc: Bug#32082 : remove VOID macro sql/sql_parse.cc: Bug#32082 : remove VOID macro sql/sql_select.cc: Bug#32082 : remove VOID macro sql/sql_servers.cc: Bug#32082 : remove VOID macro sql/sql_show.cc: Bug#32082 : remove VOID macro sql/sql_string.cc: Bug#32082 : remove VOID macro sql/sql_table.cc: Bug#32082 : remove VOID macro sql/sql_test.cc: Bug#32082 : remove VOID macro sql/sql_trigger.cc: Bug#32082 : remove VOID macro sql/sql_update.cc: Bug#32082 : remove VOID macro sql/sql_view.cc: Bug#32082 : remove VOID macro sql/table.cc: Bug#32082 : remove VOID macro sql/tztime.cc: Bug#32082 : remove VOID macro sql/udf_example.c: Bug#32082 : remove VOID macro sql/uniques.cc: Bug#32082 : remove VOID macro sql/unireg.cc: Bug#32082 : remove VOID macro storage/archive/ha_archive.cc: Bug#32082 : remove VOID macro storage/blackhole/ha_blackhole.cc: Bug#32082 : remove VOID macro storage/csv/ha_tina.cc: Bug#32082 : remove VOID macro storage/csv/transparent_file.cc: Bug#32082 : remove VOID macro storage/example/ha_example.cc: Bug#32082 : remove VOID macro storage/federated/ha_federated.cc: Bug#32082 : remove VOID macro storage/heap/hp_clear.c: Bug#32082 : remove VOID macro storage/heap/hp_create.c: Bug#32082 : remove VOID macro storage/heap/hp_test1.c: Bug#32082 : remove VOID macro storage/heap/hp_test2.c: Bug#32082 : remove VOID macro storage/innobase/handler/ha_innodb.cc: Bug#32082 : remove VOID macro storage/myisam/ft_eval.c: Bug#32082 : remove VOID macro storage/myisam/ha_myisam.cc: Bug#32082 : remove VOID macro storage/myisam/mi_changed.c: Bug#32082 : remove VOID macro storage/myisam/mi_check.c: Bug#32082 : remove VOID macro storage/myisam/mi_close.c: Bug#32082 : remove VOID macro storage/myisam/mi_create.c: Bug#32082 : remove VOID macro storage/myisam/mi_dbug.c: Bug#32082 : remove VOID macro storage/myisam/mi_delete.c: Bug#32082 : remove VOID macro storage/myisam/mi_delete_all.c: Bug#32082 : remove VOID macro storage/myisam/mi_dynrec.c: Bug#32082 : remove VOID macro storage/myisam/mi_info.c: Bug#32082 : remove VOID macro storage/myisam/mi_locking.c: Bug#32082 : remove VOID macro storage/myisam/mi_log.c: Bug#32082 : remove VOID macro storage/myisam/mi_open.c: Bug#32082 : remove VOID macro storage/myisam/mi_packrec.c: Bug#32082 : remove VOID macro storage/myisam/mi_panic.c: Bug#32082 : remove VOID macro storage/myisam/mi_rsame.c: Bug#32082 : remove VOID macro storage/myisam/mi_statrec.c: Bug#32082 : remove VOID macro storage/myisam/mi_test1.c: Bug#32082 : remove VOID macro storage/myisam/mi_test2.c: Bug#32082 : remove VOID macro storage/myisam/mi_test3.c: Bug#32082 : remove VOID macro storage/myisam/mi_update.c: Bug#32082 : remove VOID macro storage/myisam/mi_write.c: Bug#32082 : remove VOID macro storage/myisam/myisamchk.c: Bug#32082 : remove VOID macro storage/myisam/myisamlog.c: Bug#32082 : remove VOID macro storage/myisam/myisampack.c: Bug#32082 : remove VOID macro storage/myisam/sort.c: Bug#32082 : remove VOID macro storage/myisammrg/myrg_close.c: Bug#32082 : remove VOID macro storage/myisammrg/myrg_create.c: Bug#32082 : remove VOID macro storage/myisammrg/myrg_open.c: Bug#32082 : remove VOID macro strings/str_test.c: Bug#32082 : remove VOID macro tests/thread_test.c: Bug#32082 : remove VOID macro
Diffstat (limited to 'storage/myisam/myisamlog.c')
-rw-r--r--storage/myisam/myisamlog.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/storage/myisam/myisamlog.c b/storage/myisam/myisamlog.c
index fafb5140a5e..622fd1a34a3 100644
--- a/storage/myisam/myisamlog.c
+++ b/storage/myisam/myisamlog.c
@@ -121,7 +121,7 @@ int main(int argc, char **argv)
if (re_open_count)
printf("Had to do %d re-open because of too few possibly open files\n",
re_open_count);
- VOID(mi_panic(HA_PANIC_CLOSE));
+ (void) mi_panic(HA_PANIC_CLOSE);
my_free_open_file_info();
my_end(test_info ? MY_CHECK_ERROR | MY_GIVE_INFO : MY_CHECK_ERROR);
exit(error);
@@ -292,8 +292,8 @@ static void get_options(register int *argc, register char ***argv)
}
return;
err:
- VOID(fprintf(stderr,"option \"%c\" used without or with wrong argument\n",
- option));
+ (void) fprintf(stderr,"option \"%c\" used without or with wrong argument\n",
+ option);
exit(1);
}
@@ -332,8 +332,8 @@ static int examine_log(char * file_name, char **table_names)
bzero((uchar*) com_count,sizeof(com_count));
init_tree(&tree,0,0,sizeof(file_info),(qsort_cmp2) file_info_compare,1,
(tree_element_free) file_info_free, NULL);
- VOID(init_key_cache(dflt_key_cache,KEY_CACHE_BLOCK_SIZE,KEY_CACHE_SIZE,
- 0, 0));
+ (void) init_key_cache(dflt_key_cache,KEY_CACHE_BLOCK_SIZE,KEY_CACHE_SIZE,
+ 0, 0);
files_open=0; access_time=0;
while (access_time++ != number_of_commands &&
@@ -412,8 +412,8 @@ static int examine_log(char * file_name, char **table_names)
}
open_param.name=file_info.name;
open_param.max_id=0;
- VOID(tree_walk(&tree,(tree_walk_action) test_if_open,(void*) &open_param,
- left_root_right));
+ (void) tree_walk(&tree,(tree_walk_action) test_if_open,(void*) &open_param,
+ left_root_right);
file_info.id=open_param.max_id+1;
/*
* In the line below +10 is added to accomodate '<' and '>' chars
@@ -458,7 +458,7 @@ static int examine_log(char * file_name, char **table_names)
files_open++;
file_info.closed=0;
}
- VOID(tree_insert(&tree, (uchar*) &file_info, 0, tree.custom_arg));
+ (void) tree_insert(&tree, (uchar*) &file_info, 0, tree.custom_arg);
if (file_info.used)
{
if (verbose && !record_pos_file)
@@ -477,7 +477,7 @@ static int examine_log(char * file_name, char **table_names)
{
if (!curr_file_info->closed)
files_open--;
- VOID(tree_delete(&tree, (uchar*) curr_file_info, 0, tree.custom_arg));
+ (void) tree_delete(&tree, (uchar*) curr_file_info, 0, tree.custom_arg);
}
break;
case MI_LOG_EXTRA:
@@ -493,10 +493,10 @@ static int examine_log(char * file_name, char **table_names)
if (mi_extra(curr_file_info->isam, extra_command, 0) != (int) result)
{
fflush(stdout);
- VOID(fprintf(stderr,
+ (void) fprintf(stderr,
"Warning: error %d, expected %d on command %s at %s\n",
my_errno,result,command_name[command],
- llstr(isamlog_filepos,llbuff)));
+ llstr(isamlog_filepos,llbuff));
fflush(stderr);
}
}
@@ -641,39 +641,39 @@ static int examine_log(char * file_name, char **table_names)
break;
default:
fflush(stdout);
- VOID(fprintf(stderr,
+ (void) fprintf(stderr,
"Error: found unknown command %d in logfile, aborted\n",
- command));
+ command);
fflush(stderr);
goto end;
}
}
end_key_cache(dflt_key_cache,1);
delete_tree(&tree);
- VOID(end_io_cache(&cache));
- VOID(my_close(file,MYF(0)));
+ (void) end_io_cache(&cache);
+ (void) my_close(file,MYF(0));
if (write_file && my_fclose(write_file,MYF(MY_WME)))
DBUG_RETURN(1);
DBUG_RETURN(0);
err:
fflush(stdout);
- VOID(fprintf(stderr,"Got error %d when reading from logfile\n",my_errno));
+ (void) fprintf(stderr,"Got error %d when reading from logfile\n",my_errno);
fflush(stderr);
goto end;
com_err:
fflush(stdout);
- VOID(fprintf(stderr,"Got error %d, expected %d on command %s at %s\n",
+ (void) fprintf(stderr,"Got error %d, expected %d on command %s at %s\n",
my_errno,result,command_name[command],
- llstr(isamlog_filepos,llbuff)));
+ llstr(isamlog_filepos,llbuff));
fflush(stderr);
end:
end_key_cache(dflt_key_cache, 1);
delete_tree(&tree);
- VOID(end_io_cache(&cache));
- VOID(my_close(file,MYF(0)));
+ (void) end_io_cache(&cache);
+ (void) my_close(file,MYF(0));
if (write_file)
- VOID(my_fclose(write_file,MYF(MY_WME)));
+ (void) my_fclose(write_file,MYF(MY_WME));
DBUG_RETURN(1);
}
@@ -757,7 +757,7 @@ static void file_info_free(struct file_info *fileinfo)
if (update)
{
if (!fileinfo->closed)
- VOID(mi_close(fileinfo->isam));
+ (void) mi_close(fileinfo->isam);
if (fileinfo->record)
my_free(fileinfo->record,MYF(0));
}
@@ -775,8 +775,8 @@ static int close_some_file(TREE *tree)
access_param.min_accessed=LONG_MAX;
access_param.found=0;
- VOID(tree_walk(tree,(tree_walk_action) test_when_accessed,
- (void*) &access_param,left_root_right));
+ (void) tree_walk(tree,(tree_walk_action) test_when_accessed,
+ (void*) &access_param,left_root_right);
if (!access_param.found)
return 1; /* No open file that is possibly to close */
if (mi_close(access_param.found->isam))
@@ -815,7 +815,7 @@ static int find_record_with_key(struct file_info *file_info, uchar *record)
if (mi_is_key_active(info->s->state.key_map, key) &&
info->s->keyinfo[key].flag & HA_NOSAME)
{
- VOID(_mi_make_key(info,key,tmp_key,record,0L));
+ (void) _mi_make_key(info,key,tmp_key,record,0L);
return mi_rkey(info,file_info->record,(int) key,tmp_key,0,
HA_READ_KEY_EXACT);
}