summaryrefslogtreecommitdiff
path: root/storage/myisam
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
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')
-rw-r--r--storage/myisam/ft_eval.c4
-rw-r--r--storage/myisam/ha_myisam.cc12
-rw-r--r--storage/myisam/mi_changed.c2
-rw-r--r--storage/myisam/mi_check.c70
-rw-r--r--storage/myisam/mi_close.c6
-rw-r--r--storage/myisam/mi_create.c4
-rw-r--r--storage/myisam/mi_dbug.c36
-rw-r--r--storage/myisam/mi_delete.c4
-rw-r--r--storage/myisam/mi_delete_all.c4
-rw-r--r--storage/myisam/mi_dynrec.c10
-rw-r--r--storage/myisam/mi_info.c2
-rw-r--r--storage/myisam/mi_locking.c18
-rw-r--r--storage/myisam/mi_log.c14
-rw-r--r--storage/myisam/mi_open.c16
-rw-r--r--storage/myisam/mi_packrec.c6
-rw-r--r--storage/myisam/mi_panic.c2
-rw-r--r--storage/myisam/mi_rsame.c4
-rw-r--r--storage/myisam/mi_statrec.c2
-rw-r--r--storage/myisam/mi_test1.c6
-rw-r--r--storage/myisam/mi_test2.c2
-rw-r--r--storage/myisam/mi_test3.c2
-rw-r--r--storage/myisam/mi_update.c4
-rw-r--r--storage/myisam/mi_write.c4
-rw-r--r--storage/myisam/myisamchk.c86
-rw-r--r--storage/myisam/myisamlog.c50
-rw-r--r--storage/myisam/myisampack.c220
-rw-r--r--storage/myisam/sort.c2
27 files changed, 296 insertions, 296 deletions
diff --git a/storage/myisam/ft_eval.c b/storage/myisam/ft_eval.c
index de01510fdd7..f4faabe7919 100644
--- a/storage/myisam/ft_eval.c
+++ b/storage/myisam/ft_eval.c
@@ -236,8 +236,8 @@ static void print_error(int exit_code, const char *fmt,...)
va_start(args,fmt);
fprintf(stderr,"%s: error: ",my_progname);
- VOID(vfprintf(stderr, fmt, args));
- VOID(fputc('\n',stderr));
+ (void) vfprintf(stderr, fmt, args);
+ (void) fputc('\n',stderr);
fflush(stderr);
va_end(args);
exit(exit_code);
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 612d02bbcd3..cb8333767f8 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -721,11 +721,11 @@ int ha_myisam::open(const char *name, int mode, uint test_if_locked)
}
if (test_if_locked & (HA_OPEN_IGNORE_IF_LOCKED | HA_OPEN_TMP_TABLE))
- VOID(mi_extra(file, HA_EXTRA_NO_WAIT_LOCK, 0));
+ (void) mi_extra(file, HA_EXTRA_NO_WAIT_LOCK, 0);
info(HA_STATUS_NO_LOCK | HA_STATUS_VARIABLE | HA_STATUS_CONST);
if (!(test_if_locked & HA_OPEN_WAIT_IF_LOCKED))
- VOID(mi_extra(file, HA_EXTRA_WAIT_LOCK, 0));
+ (void) mi_extra(file, HA_EXTRA_WAIT_LOCK, 0);
if (!table->s->db_record_offset)
int_table_flags|=HA_REC_NOT_IN_SEQ;
if (file->s->options & (HA_OPTION_CHECKSUM | HA_OPTION_COMPRESS_RECORD))
@@ -916,8 +916,8 @@ int ha_myisam::restore(THD* thd, HA_CHECK_OPT *check_opt)
const char* errmsg;
DBUG_ENTER("restore");
- VOID(tablename_to_filename(table->s->table_name.str, table_name,
- sizeof(table_name)));
+ (void) tablename_to_filename(table->s->table_name.str, table_name,
+ sizeof(table_name));
if (fn_format_relative_to_data_home(src_path, table_name, backup_dir,
MI_NAME_DEXT))
@@ -959,8 +959,8 @@ int ha_myisam::backup(THD* thd, HA_CHECK_OPT *check_opt)
const char *errmsg;
DBUG_ENTER("ha_myisam::backup");
- VOID(tablename_to_filename(table->s->table_name.str, table_name,
- sizeof(table_name)));
+ (void) tablename_to_filename(table->s->table_name.str, table_name,
+ sizeof(table_name));
if (fn_format_relative_to_data_home(dst_path, table_name, backup_dir,
reg_ext))
diff --git a/storage/myisam/mi_changed.c b/storage/myisam/mi_changed.c
index 7422f995dd0..049974e4a65 100644
--- a/storage/myisam/mi_changed.c
+++ b/storage/myisam/mi_changed.c
@@ -25,7 +25,7 @@ int mi_is_changed(MI_INFO *info)
DBUG_ENTER("mi_is_changed");
if (fast_mi_readinfo(info))
DBUG_RETURN(-1);
- VOID(_mi_writeinfo(info,0));
+ (void) _mi_writeinfo(info,0);
result=(int) info->data_changed;
info->data_changed=0;
DBUG_PRINT("exit",("result: %d",result));
diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c
index c10cfdd0c9b..8ff803b58a0 100644
--- a/storage/myisam/mi_check.c
+++ b/storage/myisam/mi_check.c
@@ -1184,8 +1184,8 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
goto err;
start_recpos=pos;
splits++;
- VOID(_mi_pack_get_block_info(info, &info->bit_buff, &block_info,
- &info->rec_buff, -1, start_recpos));
+ (void) _mi_pack_get_block_info(info, &info->bit_buff, &block_info,
+ &info->rec_buff, -1, start_recpos);
pos=block_info.filepos+block_info.rec_len;
if (block_info.rec_len < (uint) info->s->min_pack_length ||
block_info.rec_len > (uint) info->s->max_pack_length)
@@ -1222,7 +1222,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
records++;
if (param->testflag & T_WRITE_LOOP && records % WRITE_COUNT == 0)
{
- printf("%s\r", llstr(records,llbuff)); VOID(fflush(stdout));
+ printf("%s\r", llstr(records,llbuff)); (void) fflush(stdout);
}
/* Check if keys match the record */
@@ -1275,7 +1275,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
}
if (param->testflag & T_WRITE_LOOP)
{
- VOID(fputs(" \r",stdout)); VOID(fflush(stdout));
+ (void) fputs(" \r",stdout); (void) fflush(stdout);
}
if (records != info->state->records)
{
@@ -1551,8 +1551,8 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info,
DBUG_ASSERT(param->use_buffers < SIZE_T_MAX);
if (!param->using_global_keycache)
- VOID(init_key_cache(dflt_key_cache, param->key_cache_block_size,
- (size_t) param->use_buffers, 0, 0));
+ (void) init_key_cache(dflt_key_cache, param->key_cache_block_size,
+ param->use_buffers, 0, 0);
if (init_io_cache(&param->read_cache,info->dfile,
(uint) param->read_buffer_length,
@@ -1645,8 +1645,8 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info,
llstr(info->dupp_key_pos,llbuff2));
if (param->testflag & T_VERBOSE)
{
- VOID(_mi_make_key(info,(uint) info->errkey,info->lastkey,
- sort_param.record,0L));
+ (void) _mi_make_key(info,(uint) info->errkey,info->lastkey,
+ sort_param.record,0L);
_mi_print_key(stdout,share->keyinfo[info->errkey].seg,info->lastkey,
USE_WHOLE_KEY);
}
@@ -1668,7 +1668,7 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info,
if (param->testflag & T_WRITE_LOOP)
{
- VOID(fputs(" \r",stdout)); VOID(fflush(stdout));
+ (void) fputs(" \r",stdout); (void) fflush(stdout);
}
if (my_chsize(share->kfile,info->state->key_file_length,0,MYF(0)))
{
@@ -1750,9 +1750,9 @@ err:
llstr(sort_param.start_recpos,llbuff));
if (new_file >= 0)
{
- VOID(my_close(new_file,MYF(0)));
- VOID(my_raid_delete(param->temp_filename,info->s->base.raid_chunks,
- MYF(MY_WME)));
+ (void) my_close(new_file,MYF(0));
+ (void) my_raid_delete(param->temp_filename,info->s->base.raid_chunks,
+ MYF(MY_WME));
info->rec_cache.file=-1; /* don't flush data to new_file, it's closed */
}
mi_mark_crashed_on_repair(info);
@@ -1762,9 +1762,9 @@ err:
my_free(mi_get_rec_buff_ptr(info, sort_param.record),
MYF(MY_ALLOW_ZERO_PTR));
my_free(sort_info.buff,MYF(MY_ALLOW_ZERO_PTR));
- VOID(end_io_cache(&param->read_cache));
+ (void) end_io_cache(&param->read_cache);
info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
- VOID(end_io_cache(&info->rec_cache));
+ (void) end_io_cache(&info->rec_cache);
got_error|=flush_blocks(param, share->key_cache, share->kfile);
if (!got_error && param->testflag & T_UNPACK)
{
@@ -1991,9 +1991,9 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name)
/* Put same locks as old file */
share->r_locks= share->w_locks= share->tot_locks= 0;
(void) _mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE);
- VOID(my_close(share->kfile,MYF(MY_WME)));
+ (void) my_close(share->kfile,MYF(MY_WME));
share->kfile = -1;
- VOID(my_close(new_file,MYF(MY_WME)));
+ (void) my_close(new_file,MYF(MY_WME));
if (change_to_newfile(share->index_file_name,MI_NAME_IEXT,INDEX_TMP_EXT,0,
MYF(0)) ||
mi_open_keyfile(share))
@@ -2017,9 +2017,9 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name)
DBUG_RETURN(0);
err:
- VOID(my_close(new_file,MYF(MY_WME)));
+ (void) my_close(new_file,MYF(MY_WME));
err2:
- VOID(my_delete(param->temp_filename,MYF(MY_WME)));
+ (void) my_delete(param->temp_filename,MYF(MY_WME));
DBUG_RETURN(-1);
} /* mi_sort_index */
@@ -2176,7 +2176,7 @@ int filecopy(MI_CHECK *param, File to,File from,my_off_t start,
buff=tmp_buff; buff_length=IO_SIZE;
}
- VOID(my_seek(from,start,MY_SEEK_SET,MYF(0)));
+ my_seek(from,start,MY_SEEK_SET,MYF(0));
while (length > buff_length)
{
if (my_read(from,(uchar*) buff,buff_length,MYF(MY_NABP)) ||
@@ -2486,7 +2486,7 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
if (param->testflag & T_WRITE_LOOP)
{
- VOID(fputs(" \r",stdout)); VOID(fflush(stdout));
+ (void) fputs(" \r",stdout); (void) fflush(stdout);
}
if (rep_quick && del+sort_info.dupp != info->state->del)
@@ -2539,7 +2539,7 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
err:
got_error|= flush_blocks(param, share->key_cache, share->kfile);
- VOID(end_io_cache(&info->rec_cache));
+ (void) end_io_cache(&info->rec_cache);
if (!got_error)
{
/* Replace the actual file with the temporary file */
@@ -2561,9 +2561,9 @@ err:
mi_check_print_error(param,"%d when fixing table",my_errno);
if (new_file >= 0)
{
- VOID(my_close(new_file,MYF(0)));
- VOID(my_raid_delete(param->temp_filename,share->base.raid_chunks,
- MYF(MY_WME)));
+ (void) my_close(new_file,MYF(0));
+ (void) my_raid_delete(param->temp_filename,share->base.raid_chunks,
+ MYF(MY_WME));
if (info->dfile == new_file) /* Retry with key cache */
if (unlikely(mi_open_datafile(info, share, name, -1)))
param->retry_repair= 0; /* Safety */
@@ -2581,7 +2581,7 @@ err:
my_free((uchar*) sort_info.key_block,MYF(MY_ALLOW_ZERO_PTR));
my_free((uchar*) sort_info.ft_buf, MYF(MY_ALLOW_ZERO_PTR));
my_free(sort_info.buff,MYF(MY_ALLOW_ZERO_PTR));
- VOID(end_io_cache(&param->read_cache));
+ (void) end_io_cache(&param->read_cache);
info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
if (!got_error && (param->testflag & T_UNPACK))
{
@@ -3068,7 +3068,7 @@ err:
the share by remove_io_thread() or it was not yet started (if the
error happend before creating the thread).
*/
- VOID(end_io_cache(&info->rec_cache));
+ (void) end_io_cache(&info->rec_cache);
/*
Destroy the new data cache in case of non-quick repair. All slave
threads did either detach from the share by remove_io_thread()
@@ -3076,7 +3076,7 @@ err:
creating the threads).
*/
if (!rep_quick)
- VOID(end_io_cache(&new_data_cache));
+ (void) end_io_cache(&new_data_cache);
if (!got_error)
{
/* Replace the actual file with the temporary file */
@@ -3098,9 +3098,9 @@ err:
mi_check_print_error(param,"%d when fixing table",my_errno);
if (new_file >= 0)
{
- VOID(my_close(new_file,MYF(0)));
- VOID(my_raid_delete(param->temp_filename,share->base.raid_chunks,
- MYF(MY_WME)));
+ (void) my_close(new_file,MYF(0));
+ (void) my_raid_delete(param->temp_filename,share->base.raid_chunks,
+ MYF(MY_WME));
if (info->dfile == new_file) /* Retry with key cache */
if (unlikely(mi_open_datafile(info, share, name, -1)))
param->retry_repair= 0; /* Safety */
@@ -3120,7 +3120,7 @@ err:
my_free((uchar*) sort_info.key_block,MYF(MY_ALLOW_ZERO_PTR));
my_free((uchar*) sort_param,MYF(MY_ALLOW_ZERO_PTR));
my_free(sort_info.buff,MYF(MY_ALLOW_ZERO_PTR));
- VOID(end_io_cache(&param->read_cache));
+ (void) end_io_cache(&param->read_cache);
info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
if (!got_error && (param->testflag & T_UNPACK))
{
@@ -3774,7 +3774,7 @@ int sort_write_record(MI_SORT_PARAM *sort_param)
{
char llbuff[22];
printf("%s\r", llstr(info->state->records,llbuff));
- VOID(fflush(stdout));
+ (void) fflush(stdout);
}
}
DBUG_RETURN(0);
@@ -4048,7 +4048,7 @@ static int sort_insert_key(MI_SORT_PARAM *sort_param,
key_block->end_pos+=t_length;
if (a_length <= keyinfo->block_length)
{
- VOID(_mi_move_key(keyinfo,key_block->lastkey,key));
+ (void) _mi_move_key(keyinfo,key_block->lastkey,key);
key_block->last_length=a_length-t_length;
DBUG_RETURN(0);
}
@@ -4327,7 +4327,7 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
set_if_bigger(file_length,tmp_length);
set_if_bigger(file_length,(ulonglong) share.base.max_data_file_length);
- VOID(mi_close(*org_info));
+ (void) mi_close(*org_info);
bzero((char*) &create_info,sizeof(create_info));
create_info.max_rows=max(max_records,share.base.records);
create_info.reloc_rows=share.base.reloc;
@@ -4368,7 +4368,7 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
}
/* We are modifing */
(*org_info)->s->options&= ~HA_OPTION_READ_ONLY_DATA;
- VOID(_mi_readinfo(*org_info,F_WRLCK,0));
+ (void) _mi_readinfo(*org_info,F_WRLCK,0);
(*org_info)->state->records=info.state->records;
if (share.state.create_time)
(*org_info)->s->state.create_time=share.state.create_time;
diff --git a/storage/myisam/mi_close.c b/storage/myisam/mi_close.c
index 2066d092e1f..f94c8f3558d 100644
--- a/storage/myisam/mi_close.c
+++ b/storage/myisam/mi_close.c
@@ -93,13 +93,13 @@ int mi_close(register MI_INFO *info)
}
#ifdef THREAD
thr_lock_delete(&share->lock);
- VOID(pthread_mutex_destroy(&share->intern_lock));
+ pthread_mutex_destroy(&share->intern_lock);
{
int i,keys;
keys = share->state.header.keys;
- VOID(rwlock_destroy(&share->mmap_lock));
+ (void) rwlock_destroy(&share->mmap_lock);
for(i=0; i<keys; i++) {
- VOID(rwlock_destroy(&share->key_root_lock[i]));
+ (void) rwlock_destroy(&share->key_root_lock[i]);
}
}
#endif
diff --git a/storage/myisam/mi_create.c b/storage/myisam/mi_create.c
index 0b4d781379c..7733fd5db17 100644
--- a/storage/myisam/mi_create.c
+++ b/storage/myisam/mi_create.c
@@ -838,7 +838,7 @@ err:
save_errno=my_errno;
switch (errpos) {
case 3:
- VOID(my_close(dfile,MYF(0)));
+ (void) my_close(dfile,MYF(0));
/* fall through */
case 2:
/* QQ: Tõnu should add a call to my_raid_delete() here */
@@ -848,7 +848,7 @@ err:
MYF(0));
/* fall through */
case 1:
- VOID(my_close(file,MYF(0)));
+ (void) my_close(file,MYF(0));
if (! (flags & HA_DONT_TOUCH_DATA))
my_delete_with_symlink(fn_format(filename,name,"",MI_NAME_IEXT,
MY_UNPACK_FILENAME | MY_APPEND_EXT),
diff --git a/storage/myisam/mi_dbug.c b/storage/myisam/mi_dbug.c
index 07c314c43e6..45882eda6af 100644
--- a/storage/myisam/mi_dbug.c
+++ b/storage/myisam/mi_dbug.c
@@ -30,12 +30,12 @@ void _mi_print_key(FILE *stream, register HA_KEYSEG *keyseg,
const uchar *end;
const uchar *key_end=key+length;
- VOID(fputs("Key: \"",stream));
+ (void) fputs("Key: \"",stream);
flag=0;
for (; keyseg->type && key < key_end ;keyseg++)
{
if (flag++)
- VOID(putc('-',stream));
+ (void) putc('-',stream);
end= key+ keyseg->length;
if (keyseg->flag & HA_NULL_PART)
{
@@ -51,7 +51,7 @@ void _mi_print_key(FILE *stream, register HA_KEYSEG *keyseg,
case HA_KEYTYPE_BINARY:
if (!(keyseg->flag & HA_SPACE_PACK) && keyseg->length == 1)
{ /* packed binary digit */
- VOID(fprintf(stream,"%d",(uint) *key++));
+ (void) fprintf(stream,"%d",(uint) *key++);
break;
}
/* fall through */
@@ -59,58 +59,58 @@ void _mi_print_key(FILE *stream, register HA_KEYSEG *keyseg,
case HA_KEYTYPE_NUM:
if (keyseg->flag & HA_SPACE_PACK)
{
- VOID(fprintf(stream,"%.*s",(int) *key,key+1));
+ (void) fprintf(stream,"%.*s",(int) *key,key+1);
key+= (int) *key+1;
}
else
{
- VOID(fprintf(stream,"%.*s",(int) keyseg->length,key));
+ (void) fprintf(stream,"%.*s",(int) keyseg->length,key);
key=end;
}
break;
case HA_KEYTYPE_INT8:
- VOID(fprintf(stream,"%d",(int) *((signed char*) key)));
+ (void) fprintf(stream,"%d",(int) *((signed char*) key));
key=end;
break;
case HA_KEYTYPE_SHORT_INT:
s_1= mi_sint2korr(key);
- VOID(fprintf(stream,"%d",(int) s_1));
+ (void) fprintf(stream,"%d",(int) s_1);
key=end;
break;
case HA_KEYTYPE_USHORT_INT:
{
ushort u_1;
u_1= mi_uint2korr(key);
- VOID(fprintf(stream,"%u",(uint) u_1));
+ (void) fprintf(stream,"%u",(uint) u_1);
key=end;
break;
}
case HA_KEYTYPE_LONG_INT:
l_1=mi_sint4korr(key);
- VOID(fprintf(stream,"%ld",l_1));
+ (void) fprintf(stream,"%ld",l_1);
key=end;
break;
case HA_KEYTYPE_ULONG_INT:
l_1=mi_sint4korr(key);
- VOID(fprintf(stream,"%lu",(ulong) l_1));
+ (void) fprintf(stream,"%lu",(ulong) l_1);
key=end;
break;
case HA_KEYTYPE_INT24:
- VOID(fprintf(stream,"%ld",(long) mi_sint3korr(key)));
+ (void) fprintf(stream,"%ld",(long) mi_sint3korr(key));
key=end;
break;
case HA_KEYTYPE_UINT24:
- VOID(fprintf(stream,"%lu",(ulong) mi_uint3korr(key)));
+ (void) fprintf(stream,"%lu",(ulong) mi_uint3korr(key));
key=end;
break;
case HA_KEYTYPE_FLOAT:
mi_float4get(f_1,key);
- VOID(fprintf(stream,"%g",(double) f_1));
+ (void) fprintf(stream,"%g",(double) f_1);
key=end;
break;
case HA_KEYTYPE_DOUBLE:
mi_float8get(d_1,key);
- VOID(fprintf(stream,"%g",d_1));
+ (void) fprintf(stream,"%g",d_1);
key=end;
break;
#ifdef HAVE_LONG_LONG
@@ -118,7 +118,7 @@ void _mi_print_key(FILE *stream, register HA_KEYSEG *keyseg,
{
char buff[21];
longlong2str(mi_sint8korr(key),buff,-10);
- VOID(fprintf(stream,"%s",buff));
+ (void) fprintf(stream,"%s",buff);
key=end;
break;
}
@@ -126,7 +126,7 @@ void _mi_print_key(FILE *stream, register HA_KEYSEG *keyseg,
{
char buff[21];
longlong2str(mi_sint8korr(key),buff,10);
- VOID(fprintf(stream,"%s",buff));
+ (void) fprintf(stream,"%s",buff);
key=end;
break;
}
@@ -152,14 +152,14 @@ void _mi_print_key(FILE *stream, register HA_KEYSEG *keyseg,
The following command sometimes gives a warning from valgrind.
Not yet sure if the bug is in valgrind, glibc or mysqld
*/
- VOID(fprintf(stream,"%.*s",(int) tmp_length,key));
+ (void) fprintf(stream,"%.*s",(int) tmp_length,key);
key+=tmp_length;
break;
}
default: break; /* This never happens */
}
}
- VOID(fputs("\"\n",stream));
+ (void) fputs("\"\n",stream);
return;
} /* print_key */
diff --git a/storage/myisam/mi_delete.c b/storage/myisam/mi_delete.c
index 904ce4b2247..9314148cd8c 100644
--- a/storage/myisam/mi_delete.c
+++ b/storage/myisam/mi_delete.c
@@ -101,7 +101,7 @@ int mi_delete(MI_INFO *info,const uchar *record)
mi_sizestore(lastpos,info->lastpos);
myisam_log_command(MI_LOG_DELETE,info,(uchar*) lastpos,sizeof(lastpos),0);
- VOID(_mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE));
+ (void) _mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE);
allow_break(); /* Allow SIGHUP & SIGINT */
if (info->invalidator != 0)
{
@@ -120,7 +120,7 @@ err:
mi_print_error(info->s, HA_ERR_CRASHED);
mi_mark_crashed(info); /* mark table crashed */
}
- VOID(_mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE));
+ (void) _mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE);
info->update|=HA_STATE_WRITTEN; /* Buffer changed */
allow_break(); /* Allow SIGHUP & SIGINT */
my_errno=save_errno;
diff --git a/storage/myisam/mi_delete_all.c b/storage/myisam/mi_delete_all.c
index e2bbb04ab3c..cbf5abf7ef5 100644
--- a/storage/myisam/mi_delete_all.c
+++ b/storage/myisam/mi_delete_all.c
@@ -60,7 +60,7 @@ int mi_delete_all_rows(MI_INFO *info)
if (my_chsize(info->dfile, 0, 0, MYF(MY_WME)) ||
my_chsize(share->kfile, share->base.keystart, 0, MYF(MY_WME)) )
goto err;
- VOID(_mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE));
+ (void) _mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE);
#ifdef HAVE_MMAP
/* Map again */
if (share->file_map)
@@ -72,7 +72,7 @@ int mi_delete_all_rows(MI_INFO *info)
err:
{
int save_errno=my_errno;
- VOID(_mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE));
+ (void) _mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE);
info->update|=HA_STATE_WRITTEN; /* Buffer changed */
allow_break(); /* Allow SIGHUP & SIGINT */
DBUG_RETURN(my_errno=save_errno);
diff --git a/storage/myisam/mi_dynrec.c b/storage/myisam/mi_dynrec.c
index 79f1ea0e4e5..1de0fef876d 100644
--- a/storage/myisam/mi_dynrec.c
+++ b/storage/myisam/mi_dynrec.c
@@ -115,7 +115,7 @@ void mi_remap_file(MI_INFO *info, my_off_t size)
{
if (info->s->file_map)
{
- VOID(my_munmap((char*) info->s->file_map,
+ (void) (my_munmap((char*) info->s->file_map,
(size_t) info->s->mmaped_length));
mi_dynmap_file(info, size);
}
@@ -1515,7 +1515,7 @@ int _mi_read_dynamic_record(MI_INFO *info, my_off_t filepos, uchar *buf)
panic:
my_errno=HA_ERR_WRONG_IN_RECORD;
err:
- VOID(_mi_writeinfo(info,0));
+ (void) _mi_writeinfo(info,0);
DBUG_RETURN(-1);
}
@@ -1831,7 +1831,7 @@ int _mi_read_rnd_dynamic_record(MI_INFO *info, uchar *buf,
block_info.filepos + block_info.data_len &&
flush_io_cache(&info->rec_cache))
goto err;
- /* VOID(my_seek(info->dfile,filepos,MY_SEEK_SET,MYF(0))); */
+ /* my_seek(info->dfile,filepos,MY_SEEK_SET,MYF(0)); */
if (my_read(info->dfile,(uchar*) to,block_info.data_len,MYF(MY_NABP)))
{
if (my_errno == -1)
@@ -1865,7 +1865,7 @@ panic:
my_errno=HA_ERR_WRONG_IN_RECORD; /* Something is fatal wrong */
err:
save_errno=my_errno;
- VOID(_mi_writeinfo(info,0));
+ (void) _mi_writeinfo(info,0);
DBUG_RETURN(my_errno=save_errno);
}
@@ -1884,7 +1884,7 @@ uint _mi_get_block_info(MI_BLOCK_INFO *info, File file, my_off_t filepos)
pointer set to the end of the header after this function.
my_pread() may leave the file pointer untouched.
*/
- VOID(my_seek(file,filepos,MY_SEEK_SET,MYF(0)));
+ my_seek(file,filepos,MY_SEEK_SET,MYF(0));
if (my_read(file, header, sizeof(info->header),MYF(0)) !=
sizeof(info->header))
goto err;
diff --git a/storage/myisam/mi_info.c b/storage/myisam/mi_info.c
index 91e7ca659e4..a454a4ade9b 100644
--- a/storage/myisam/mi_info.c
+++ b/storage/myisam/mi_info.c
@@ -43,7 +43,7 @@ int mi_status(MI_INFO *info, register MI_ISAMINFO *x, uint flag)
if (!(flag & HA_STATUS_NO_LOCK))
{
pthread_mutex_lock(&share->intern_lock);
- VOID(_mi_readinfo(info,F_RDLCK,0));
+ (void) _mi_readinfo(info,F_RDLCK,0);
fast_mi_writeinfo(info);
pthread_mutex_unlock(&share->intern_lock);
}
diff --git a/storage/myisam/mi_locking.c b/storage/myisam/mi_locking.c
index 8a5866ae763..687962af42a 100644
--- a/storage/myisam/mi_locking.c
+++ b/storage/myisam/mi_locking.c
@@ -173,12 +173,12 @@ int mi_lock_database(MI_INFO *info, int lock_type)
if (mi_state_info_read_dsk(share->kfile, &share->state, 1))
{
error=my_errno;
- VOID(my_lock(share->kfile,F_UNLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE)));
+ (void) my_lock(share->kfile,F_UNLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE));
my_errno=error;
break;
}
}
- VOID(_mi_test_if_changed(info));
+ (void) _mi_test_if_changed(info);
share->r_locks++;
share->tot_locks++;
info->lock_type=lock_type;
@@ -217,15 +217,15 @@ int mi_lock_database(MI_INFO *info, int lock_type)
if (mi_state_info_read_dsk(share->kfile, &share->state, 1))
{
error=my_errno;
- VOID(my_lock(share->kfile,F_UNLCK,0L,F_TO_EOF,
- info->lock_wait | MY_SEEK_NOT_DONE));
+ (void) my_lock(share->kfile,F_UNLCK,0L,F_TO_EOF,
+ info->lock_wait | MY_SEEK_NOT_DONE);
my_errno=error;
break;
}
}
}
}
- VOID(_mi_test_if_changed(info));
+ (void) _mi_test_if_changed(info);
info->lock_type=lock_type;
info->invalidator=info->s->invalidator;
@@ -412,14 +412,14 @@ int _mi_readinfo(register MI_INFO *info, int lock_type, int check_keybuffer)
if (mi_state_info_read_dsk(share->kfile, &share->state, 1))
{
int error=my_errno ? my_errno : -1;
- VOID(my_lock(share->kfile,F_UNLCK,0L,F_TO_EOF,
- MYF(MY_SEEK_NOT_DONE)));
+ (void) my_lock(share->kfile,F_UNLCK,0L,F_TO_EOF,
+ MYF(MY_SEEK_NOT_DONE));
my_errno=error;
DBUG_RETURN(1);
}
}
if (check_keybuffer)
- VOID(_mi_test_if_changed(info));
+ (void) _mi_test_if_changed(info);
info->invalidator=info->s->invalidator;
}
else if (lock_type == F_WRLCK && info->lock_type == F_RDLCK)
@@ -487,7 +487,7 @@ int _mi_test_if_changed(register MI_INFO *info)
{ /* Keyfile has changed */
DBUG_PRINT("info",("index file changed"));
if (share->state.process != share->this_process)
- VOID(flush_key_blocks(share->key_cache, share->kfile, FLUSH_RELEASE));
+ (void) flush_key_blocks(share->key_cache, share->kfile, FLUSH_RELEASE);
share->last_process=share->state.process;
info->last_unique= share->state.unique;
info->last_loop= share->state.update_count;
diff --git a/storage/myisam/mi_log.c b/storage/myisam/mi_log.c
index 8b9ca038fec..14e496e79b7 100644
--- a/storage/myisam/mi_log.c
+++ b/storage/myisam/mi_log.c
@@ -88,8 +88,8 @@ void _myisam_log(enum myisam_log_commands command, MI_INFO *info,
pthread_mutex_lock(&THR_LOCK_myisam);
error=my_lock(myisam_log_file,F_WRLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE));
- VOID(my_write(myisam_log_file,buff,sizeof(buff),MYF(0)));
- VOID(my_write(myisam_log_file,buffert,length,MYF(0)));
+ (void) my_write(myisam_log_file,buff,sizeof(buff),MYF(0));
+ (void) my_write(myisam_log_file,buffert,length,MYF(0));
if (!error)
error=my_lock(myisam_log_file,F_UNLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE));
pthread_mutex_unlock(&THR_LOCK_myisam);
@@ -111,9 +111,9 @@ void _myisam_log_command(enum myisam_log_commands command, MI_INFO *info,
mi_int2store(buff+7,result);
pthread_mutex_lock(&THR_LOCK_myisam);
error=my_lock(myisam_log_file,F_WRLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE));
- VOID(my_write(myisam_log_file,buff,sizeof(buff),MYF(0)));
+ (void) my_write(myisam_log_file,buff,sizeof(buff),MYF(0));
if (buffert)
- VOID(my_write(myisam_log_file,buffert,length,MYF(0)));
+ (void) my_write(myisam_log_file,buffert,length,MYF(0));
if (!error)
error=my_lock(myisam_log_file,F_UNLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE));
pthread_mutex_unlock(&THR_LOCK_myisam);
@@ -142,8 +142,8 @@ void _myisam_log_record(enum myisam_log_commands command, MI_INFO *info,
mi_int4store(buff+17,length);
pthread_mutex_lock(&THR_LOCK_myisam);
error=my_lock(myisam_log_file,F_WRLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE));
- VOID(my_write(myisam_log_file, buff,sizeof(buff),MYF(0)));
- VOID(my_write(myisam_log_file, record,info->s->base.reclength,MYF(0)));
+ (void) my_write(myisam_log_file, buff,sizeof(buff),MYF(0));
+ (void) my_write(myisam_log_file, record,info->s->base.reclength,MYF(0));
if (info->s->base.blobs)
{
MI_BLOB *blob,*end;
@@ -154,7 +154,7 @@ void _myisam_log_record(enum myisam_log_commands command, MI_INFO *info,
{
memcpy_fixed((uchar*) &pos, record+blob->offset+blob->pack_length,
sizeof(char*));
- VOID(my_write(myisam_log_file,pos,blob->length,MYF(0)));
+ (void) my_write(myisam_log_file,pos,blob->length,MYF(0));
}
}
if (!error)
diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c
index 9117d76de24..b97470c0aa6 100644
--- a/storage/myisam/mi_open.c
+++ b/storage/myisam/mi_open.c
@@ -181,7 +181,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
end_pos=disk_cache+info_length;
errpos=2;
- VOID(my_seek(kfile,0L,MY_SEEK_SET,MYF(0)));
+ my_seek(kfile,0L,MY_SEEK_SET,MYF(0));
if (!(open_flags & HA_OPEN_TMP_TABLE))
{
if ((lock_error=my_lock(kfile,F_RDLCK,0L,F_TO_EOF,
@@ -482,7 +482,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
if (! lock_error)
{
- VOID(my_lock(kfile,F_UNLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE)));
+ (void) my_lock(kfile,F_UNLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE));
lock_error=1; /* Database unlocked */
}
@@ -522,10 +522,10 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
share->is_log_table= FALSE;
#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);
for (i=0; i<keys; i++)
- VOID(my_rwlock_init(&share->key_root_lock[i], NULL));
- VOID(my_rwlock_init(&share->mmap_lock, NULL));
+ (void) my_rwlock_init(&share->key_root_lock[i], NULL);
+ (void) my_rwlock_init(&share->mmap_lock, NULL);
if (!thr_lock_inited)
{
/* Probably a single threaded program; Don't use concurrent inserts */
@@ -670,7 +670,7 @@ err:
my_free((uchar*) m_info,MYF(0));
/* fall through */
case 5:
- VOID(my_close(info.dfile,MYF(0)));
+ (void) my_close(info.dfile,MYF(0));
if (old_info)
break; /* Don't remove open table */
/* fall through */
@@ -679,13 +679,13 @@ err:
/* fall through */
case 3:
if (! lock_error)
- VOID(my_lock(kfile, F_UNLCK, 0L, F_TO_EOF, MYF(MY_SEEK_NOT_DONE)));
+ (void) my_lock(kfile, F_UNLCK, 0L, F_TO_EOF, MYF(MY_SEEK_NOT_DONE));
/* fall through */
case 2:
my_afree(disk_cache);
/* fall through */
case 1:
- VOID(my_close(kfile,MYF(0)));
+ (void) my_close(kfile,MYF(0));
/* fall through */
case 0:
default:
diff --git a/storage/myisam/mi_packrec.c b/storage/myisam/mi_packrec.c
index 5ef9aa7f88f..887a8254979 100644
--- a/storage/myisam/mi_packrec.c
+++ b/storage/myisam/mi_packrec.c
@@ -1373,7 +1373,7 @@ uint _mi_pack_get_block_info(MI_INFO *myisam, MI_BIT_BUFF *bit_buff,
We can't use my_pread() here because mi_read_rnd_pack_record assumes
position is ok
*/
- VOID(my_seek(file,filepos,MY_SEEK_SET,MYF(0)));
+ my_seek(file,filepos,MY_SEEK_SET,MYF(0));
if (my_read(file, header,ref_length,MYF(MY_NABP)))
return BLOCK_FATAL_ERROR;
DBUG_DUMP("header",(uchar*) header,ref_length);
@@ -1516,8 +1516,8 @@ my_bool _mi_memmap_file(MI_INFO *info)
void _mi_unmap_file(MI_INFO *info)
{
- VOID(my_munmap((char*) info->s->file_map,
- (size_t) info->s->mmaped_length + MEMMAP_EXTRA_MARGIN));
+ (void) my_munmap((char*) info->s->file_map,
+ (size_t) info->s->mmaped_length + MEMMAP_EXTRA_MARGIN);
}
diff --git a/storage/myisam/mi_panic.c b/storage/myisam/mi_panic.c
index 74c93761b61..02dfb239cc0 100644
--- a/storage/myisam/mi_panic.c
+++ b/storage/myisam/mi_panic.c
@@ -103,7 +103,7 @@ int mi_panic(enum ha_panic_function flag)
}
if (flag == HA_PANIC_CLOSE)
{
- VOID(mi_log(0)); /* Close log if neaded */
+ (void) mi_log(0); /* Close log if neaded */
ft_free_stopwords();
}
pthread_mutex_unlock(&THR_LOCK_myisam);
diff --git a/storage/myisam/mi_rsame.c b/storage/myisam/mi_rsame.c
index 8093498483f..08c482acc9b 100644
--- a/storage/myisam/mi_rsame.c
+++ b/storage/myisam/mi_rsame.c
@@ -50,9 +50,9 @@ int mi_rsame(MI_INFO *info, uchar *record, int inx)
info->lastpos);
if (info->s->concurrent_insert)
rw_rdlock(&info->s->key_root_lock[inx]);
- VOID(_mi_search(info,info->s->keyinfo+inx,info->lastkey, USE_WHOLE_KEY,
+ (void) _mi_search(info,info->s->keyinfo+inx,info->lastkey, USE_WHOLE_KEY,
SEARCH_SAME,
- info->s->state.key_root[inx]));
+ info->s->state.key_root[inx]);
if (info->s->concurrent_insert)
rw_unlock(&info->s->key_root_lock[inx]);
}
diff --git a/storage/myisam/mi_statrec.c b/storage/myisam/mi_statrec.c
index e3771560c01..74fca5902f5 100644
--- a/storage/myisam/mi_statrec.c
+++ b/storage/myisam/mi_statrec.c
@@ -282,7 +282,7 @@ int _mi_read_rnd_static_record(MI_INFO *info, uchar *buf,
info->s->base.pack_reclength - info->s->base.reclength);
}
if (locked)
- VOID(_mi_writeinfo(info,0)); /* Unlock keyfile */
+ (void) _mi_writeinfo(info,0); /* Unlock keyfile */
if (!error)
{
if (!buf[0])
diff --git a/storage/myisam/mi_test1.c b/storage/myisam/mi_test1.c
index f218bf4e77f..d4b8dea9ede 100644
--- a/storage/myisam/mi_test1.c
+++ b/storage/myisam/mi_test1.c
@@ -161,7 +161,7 @@ static int run_test(const char *filename)
row_count=deleted=0;
for (i=49 ; i>=1 ; i-=2 )
{
- if (insert_count-- == 0) { VOID(mi_close(file)) ; exit(0) ; }
+ if (insert_count-- == 0) { (void) mi_close(file); exit(0) ; }
j=i%25 +1;
create_record(record,j);
error=mi_write(file,record);
@@ -225,7 +225,7 @@ static int run_test(const char *filename)
found=0;
while ((error=mi_rrnd(file,read_record,pos)) == 0)
{
- if (update_count-- == 0) { VOID(mi_close(file)) ; exit(0) ; }
+ if (update_count-- == 0) { (void) mi_close(file); exit(0) ; }
memcpy(record,read_record,rec_length);
update_record(record);
if (mi_update(file,read_record,record))
@@ -252,7 +252,7 @@ static int run_test(const char *filename)
for (i=0 ; i <= 10 ; i++)
{
/* testing */
- if (remove_count-- == 0) { VOID(mi_close(file)) ; exit(0) ; }
+ if (remove_count-- == 0) { (void) mi_close(file); exit(0) ; }
j=i*2;
if (!flags[j])
continue;
diff --git a/storage/myisam/mi_test2.c b/storage/myisam/mi_test2.c
index 23c58638166..860626b84a9 100644
--- a/storage/myisam/mi_test2.c
+++ b/storage/myisam/mi_test2.c
@@ -862,7 +862,7 @@ reads: %10lu\n",
err:
printf("got error: %d when using MyISAM-database\n",my_errno);
if (file)
- VOID(mi_close(file));
+ (void) mi_close(file);
return(1);
} /* main */
diff --git a/storage/myisam/mi_test3.c b/storage/myisam/mi_test3.c
index 5bdc33b8518..6871658e486 100644
--- a/storage/myisam/mi_test3.c
+++ b/storage/myisam/mi_test3.c
@@ -109,7 +109,7 @@ int main(int argc,char **argv)
sleep(1);
return 0;
}
- VOID(rnd(1));
+ (void) rnd(1);
}
for (i=0 ; i < forks ; i++)
diff --git a/storage/myisam/mi_update.c b/storage/myisam/mi_update.c
index a18bb5f1443..b538bcd0bb1 100644
--- a/storage/myisam/mi_update.c
+++ b/storage/myisam/mi_update.c
@@ -178,7 +178,7 @@ int mi_update(register MI_INFO *info, const uchar *oldrec, uchar *newrec)
mi_update() must always pass !0 value as operation, since even if
there is no index change there could be data change.
*/
- VOID(_mi_writeinfo(info, WRITEINFO_UPDATE_KEYFILE));
+ (void) _mi_writeinfo(info, WRITEINFO_UPDATE_KEYFILE);
allow_break(); /* Allow SIGHUP & SIGINT */
if (info->invalidator != 0)
{
@@ -229,7 +229,7 @@ err:
err_end:
myisam_log_record(MI_LOG_UPDATE,info,newrec,info->lastpos,my_errno);
- VOID(_mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE));
+ (void) _mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE);
allow_break(); /* Allow SIGHUP & SIGINT */
if (save_errno == HA_ERR_KEY_NOT_FOUND)
{
diff --git a/storage/myisam/mi_write.c b/storage/myisam/mi_write.c
index 624c31e57ff..b9bc84aa6ad 100644
--- a/storage/myisam/mi_write.c
+++ b/storage/myisam/mi_write.c
@@ -155,7 +155,7 @@ int mi_write(MI_INFO *info, uchar *record)
info->state->records++;
info->lastpos=filepos;
myisam_log_record(MI_LOG_WRITE,info,record,filepos,0);
- VOID(_mi_writeinfo(info, WRITEINFO_UPDATE_KEYFILE));
+ (void) _mi_writeinfo(info, WRITEINFO_UPDATE_KEYFILE);
if (info->invalidator != 0)
{
DBUG_PRINT("info", ("invalidator... '%s' (update)", info->filename));
@@ -232,7 +232,7 @@ err:
err2:
save_errno=my_errno;
myisam_log_record(MI_LOG_WRITE,info,record,filepos,my_errno);
- VOID(_mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE));
+ (void) _mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE);
allow_break(); /* Allow SIGHUP & SIGINT */
DBUG_RETURN(my_errno=save_errno);
} /* mi_write */
diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c
index 611fb6325c8..7df043ce801 100644
--- a/storage/myisam/myisamchk.c
+++ b/storage/myisam/myisamchk.c
@@ -99,8 +99,8 @@ int main(int argc, char **argv)
int new_error=myisamchk(&check_param, *(argv++));
if ((check_param.testflag & T_REP_ANY) != T_REP)
check_param.testflag&= ~T_REP;
- VOID(fflush(stdout));
- VOID(fflush(stderr));
+ (void) fflush(stdout);
+ (void) fflush(stderr);
if ((check_param.error_printed | check_param.warning_printed) &&
(check_param.testflag & T_FORCE_CREATE) &&
(!(check_param.testflag & (T_REP | T_REP_BY_SORT | T_SORT_RECORDS |
@@ -112,15 +112,15 @@ int main(int argc, char **argv)
check_param.testflag&= ~T_EXTEND; /* Don't needed */
error|=myisamchk(&check_param, argv[-1]);
check_param.testflag= old_testflag;
- VOID(fflush(stdout));
- VOID(fflush(stderr));
+ (void) fflush(stdout);
+ (void) fflush(stderr);
}
else
error|=new_error;
if (argc && (!(check_param.testflag & T_SILENT) || check_param.testflag & T_INFO))
{
puts("\n---------\n");
- VOID(fflush(stdout));
+ (void) fflush(stdout);
}
}
if (check_param.total_files > 1)
@@ -762,9 +762,9 @@ static void get_options(register int *argc,register char ***argv)
if ((check_param.testflag & T_UNPACK) &&
(check_param.testflag & (T_QUICK | T_SORT_RECORDS)))
{
- VOID(fprintf(stderr,
+ (void) fprintf(stderr,
"%s: --unpack can't be used with --quick or --sort-records\n",
- my_progname_short));
+ my_progname_short);
exit(1);
}
if ((check_param.testflag & T_READONLY) &&
@@ -772,9 +772,9 @@ static void get_options(register int *argc,register char ***argv)
(T_REP_ANY | T_STATISTICS | T_AUTO_INC |
T_SORT_RECORDS | T_SORT_INDEX | T_FORCE_CREATE)))
{
- VOID(fprintf(stderr,
+ (void) fprintf(stderr,
"%s: Can't use --readonly when repairing or sorting\n",
- my_progname_short));
+ my_progname_short);
exit(1);
}
@@ -928,9 +928,9 @@ static int myisamchk(MI_CHECK *param, char * filename)
param->language= set_collation->number;
if (recreate_table(param, &info,filename))
{
- VOID(fprintf(stderr,
+ (void) fprintf(stderr,
"MyISAM-table '%s' is not fixed because of errors\n",
- filename));
+ filename);
return(-1);
}
recreate=1;
@@ -1030,7 +1030,7 @@ static int myisamchk(MI_CHECK *param, char * filename)
#ifndef TO_BE_REMOVED
if (param->out_flag & O_NEW_DATA)
{ /* Change temp file to org file */
- VOID(my_close(info->dfile,MYF(MY_WME))); /* Close new file */
+ (void) my_close(info->dfile,MYF(MY_WME)); /* Close new file */
error|=change_to_newfile(filename,MI_NAME_DEXT,DATA_TMP_EXT,
raid_chunks,
MYF(0));
@@ -1101,23 +1101,23 @@ static int myisamchk(MI_CHECK *param, char * filename)
!(param->testflag & (T_FAST | T_FORCE_CREATE)))
{
if (param->testflag & (T_EXTEND | T_MEDIUM))
- VOID(init_key_cache(dflt_key_cache,opt_key_cache_block_size,
- (size_t) param->use_buffers, 0, 0));
- VOID(init_io_cache(&param->read_cache,datafile,
+ (void) init_key_cache(dflt_key_cache,opt_key_cache_block_size,
+ param->use_buffers, 0, 0);
+ (void) init_io_cache(&param->read_cache,datafile,
(uint) param->read_buffer_length,
READ_CACHE,
(param->start_check_pos ?
param->start_check_pos :
share->pack.header_length),
1,
- MYF(MY_WME)));
+ MYF(MY_WME));
lock_memory(param);
if ((info->s->options & (HA_OPTION_PACK_RECORD |
HA_OPTION_COMPRESS_RECORD)) ||
(param->testflag & (T_EXTEND | T_MEDIUM)))
error|=chk_data_link(param, info, param->testflag & T_EXTEND);
error|=flush_blocks(param, share->key_cache, share->kfile);
- VOID(end_io_cache(&param->read_cache));
+ (void) end_io_cache(&param->read_cache);
}
if (!error)
{
@@ -1150,7 +1150,7 @@ static int myisamchk(MI_CHECK *param, char * filename)
(state_updated ? UPDATE_STAT : 0) |
((param->testflag & T_SORT_RECORDS) ?
UPDATE_SORT : 0)));
- VOID(lock_file(param, share->kfile,0L,F_UNLCK,"indexfile",filename));
+ (void) lock_file(param, share->kfile,0L,F_UNLCK,"indexfile",filename);
info->update&= ~HA_STATE_CHANGED;
}
mi_lock_database(info, F_UNLCK);
@@ -1171,30 +1171,30 @@ end2:
error|=change_to_newfile(filename,MI_NAME_IEXT,INDEX_TMP_EXT,0,
MYF(0));
}
- VOID(fflush(stdout)); VOID(fflush(stderr));
+ (void) fflush(stdout); (void) fflush(stderr);
if (param->error_printed)
{
if (param->testflag & (T_REP_ANY | T_SORT_RECORDS | T_SORT_INDEX))
{
- VOID(fprintf(stderr,
+ (void) fprintf(stderr,
"MyISAM-table '%s' is not fixed because of errors\n",
- filename));
+ filename);
if (param->testflag & T_REP_ANY)
- VOID(fprintf(stderr,
- "Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag\n"));
+ (void) fprintf(stderr,
+ "Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag\n");
}
else if (!(param->error_printed & 2) &&
!(param->testflag & T_FORCE_CREATE))
- VOID(fprintf(stderr,
+ (void) fprintf(stderr,
"MyISAM-table '%s' is corrupted\nFix it using switch \"-r\" or \"-o\"\n",
- filename));
+ filename);
}
else if (param->warning_printed &&
! (param->testflag & (T_REP_ANY | T_SORT_RECORDS | T_SORT_INDEX |
T_FORCE_CREATE)))
- VOID(fprintf(stderr, "MyISAM-table '%s' is usable but should be fixed\n",
- filename));
- VOID(fflush(stderr));
+ (void) fprintf(stderr, "MyISAM-table '%s' is usable but should be fixed\n",
+ filename);
+ (void) fflush(stderr);
DBUG_RETURN(error);
} /* myisamchk */
@@ -1321,7 +1321,7 @@ static void descript(MI_CHECK *param, register MI_INFO *info, char * name)
printf("Key Start Len Index Type");
if (param->testflag & T_VERBOSE)
printf(" Rec/key Root Blocksize");
- VOID(putchar('\n'));
+ (void) putchar('\n');
for (key=keyseg_nr=0, keyinfo= &share->keyinfo[0] ;
key < share->base.keys;
@@ -1360,7 +1360,7 @@ static void descript(MI_CHECK *param, register MI_INFO *info, char * name)
printf("%11lu %12s %10d",
share->state.rec_per_key_part[keyseg_nr++],
buff,keyinfo->block_length);
- VOID(putchar('\n'));
+ (void) putchar('\n');
while ((++keyseg)->type != HA_KEYTYPE_END)
{
pos=buff;
@@ -1379,7 +1379,7 @@ static void descript(MI_CHECK *param, register MI_INFO *info, char * name)
(long) keyseg->start+1,keyseg->length,buff);
if (param->testflag & T_VERBOSE)
printf("%11lu", share->state.rec_per_key_part[keyseg_nr++]);
- VOID(putchar('\n'));
+ (void) putchar('\n');
}
keyseg++;
}
@@ -1417,7 +1417,7 @@ static void descript(MI_CHECK *param, register MI_INFO *info, char * name)
printf("\nField Start Length Nullpos Nullbit Type");
if (share->options & HA_OPTION_COMPRESS_RECORD)
printf(" Huff tree Bits");
- VOID(putchar('\n'));
+ (void) putchar('\n');
start=1;
for (field=0 ; field < share->base.fields ; field++)
{
@@ -1456,7 +1456,7 @@ static void descript(MI_CHECK *param, register MI_INFO *info, char * name)
(uint) (share->rec[field].huff_tree-share->decode_trees)+1,
share->rec[field].huff_tree->quick_table_bits);
}
- VOID(putchar('\n'));
+ (void) putchar('\n');
start+=share->rec[field].length;
}
}
@@ -1604,7 +1604,7 @@ static int mi_sort_records(MI_CHECK *param,
goto err;
}
- VOID(my_close(info->dfile,MYF(MY_WME)));
+ (void) my_close(info->dfile,MYF(MY_WME));
param->out_flag|=O_NEW_DATA; /* Data in new file */
info->dfile=new_file; /* Use new datafile */
info->state->del=0;
@@ -1618,14 +1618,14 @@ static int mi_sort_records(MI_CHECK *param,
if (param->testflag & T_WRITE_LOOP)
{
- VOID(fputs(" \r",stdout)); VOID(fflush(stdout));
+ (void) fputs(" \r",stdout); (void) fflush(stdout);
}
got_error=0;
err:
if (got_error && new_file >= 0)
{
- VOID(end_io_cache(&info->rec_cache));
+ (void) end_io_cache(&info->rec_cache);
(void) my_close(new_file,MYF(MY_WME));
(void) my_raid_delete(param->temp_filename, share->base.raid_chunks,
MYF(MY_WME));
@@ -1637,7 +1637,7 @@ err:
my_free(mi_get_rec_buff_ptr(info, sort_param.record),
MYF(MY_ALLOW_ZERO_PTR));
info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
- VOID(end_io_cache(&info->rec_cache));
+ (void) end_io_cache(&info->rec_cache);
my_free(sort_info.buff,MYF(MY_ALLOW_ZERO_PTR));
sort_info.buff=0;
share->state.sortkey=sort_key;
@@ -1761,8 +1761,8 @@ void mi_check_print_info(MI_CHECK *param __attribute__((unused)),
va_list args;
va_start(args,fmt);
- VOID(vfprintf(stdout, fmt, args));
- VOID(fputc('\n',stdout));
+ (void) vfprintf(stdout, fmt, args);
+ (void) fputc('\n',stdout);
va_end(args);
}
@@ -1784,8 +1784,8 @@ void mi_check_print_warning(MI_CHECK *param, const char *fmt,...)
param->warning_printed=1;
va_start(args,fmt);
fprintf(stderr,"%s: warning: ",my_progname_short);
- VOID(vfprintf(stderr, fmt, args));
- VOID(fputc('\n',stderr));
+ (void) vfprintf(stderr, fmt, args);
+ (void) fputc('\n',stderr);
fflush(stderr);
va_end(args);
DBUG_VOID_RETURN;
@@ -1809,8 +1809,8 @@ void mi_check_print_error(MI_CHECK *param, const char *fmt,...)
param->error_printed|=1;
va_start(args,fmt);
fprintf(stderr,"%s: error: ",my_progname_short);
- VOID(vfprintf(stderr, fmt, args));
- VOID(fputc('\n',stderr));
+ (void) vfprintf(stderr, fmt, args);
+ (void) fputc('\n',stderr);
fflush(stderr);
va_end(args);
DBUG_VOID_RETURN;
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);
}
diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c
index 908c32e48d3..8adfcfd6fb2 100644
--- a/storage/myisam/myisampack.c
+++ b/storage/myisam/myisampack.c
@@ -238,8 +238,8 @@ int main(int argc, char **argv)
}
if (ok && isamchk_neaded && !silent)
puts("Remember to run myisamchk -rq on compressed tables");
- VOID(fflush(stdout));
- VOID(fflush(stderr));
+ (void) fflush(stdout);
+ (void) fflush(stderr);
free_defaults(default_argv);
my_end(verbose ? MY_CHECK_ERROR | MY_GIVE_INFO : MY_CHECK_ERROR);
exit(error ? 2 : 0);
@@ -291,8 +291,8 @@ static struct my_option my_long_options[] =
static void print_version(void)
{
- VOID(printf("%s Ver 1.23 for %s on %s\n",
- my_progname, SYSTEM_TYPE, MACHINE_TYPE));
+ printf("%s Ver 1.23 for %s on %s\n",
+ my_progname, SYSTEM_TYPE, MACHINE_TYPE);
NETWARE_SET_SCREEN_MODE(1);
}
@@ -309,7 +309,7 @@ static void usage(void)
puts("afterwards to update the keys.");
puts("You should give the .MYI file as the filename argument.");
- VOID(printf("\nUsage: %s [OPTIONS] filename...\n", my_progname));
+ printf("\nUsage: %s [OPTIONS] filename...\n", my_progname);
my_print_help(my_long_options);
print_defaults("my", load_default_groups);
my_print_variables(my_long_options);
@@ -407,7 +407,7 @@ static MI_INFO *open_isam_file(char *name,int mode)
(opt_wait ? HA_OPEN_WAIT_IF_LOCKED :
HA_OPEN_ABORT_IF_LOCKED))))
{
- VOID(fprintf(stderr, "%s gave error %d on open\n", name, my_errno));
+ (void) fprintf(stderr, "%s gave error %d on open\n", name, my_errno);
DBUG_RETURN(0);
}
share=isam_file->s;
@@ -415,8 +415,8 @@ static MI_INFO *open_isam_file(char *name,int mode)
{
if (!force_pack)
{
- VOID(fprintf(stderr, "%s is already compressed\n", name));
- VOID(mi_close(isam_file));
+ (void) fprintf(stderr, "%s is already compressed\n", name);
+ (void) mi_close(isam_file);
DBUG_RETURN(0);
}
if (verbose)
@@ -427,11 +427,11 @@ static MI_INFO *open_isam_file(char *name,int mode)
(share->state.state.records <= 1 ||
share->state.state.data_file_length < 1024))
{
- VOID(fprintf(stderr, "%s is too small to compress\n", name));
- VOID(mi_close(isam_file));
+ (void) fprintf(stderr, "%s is too small to compress\n", name);
+ (void) mi_close(isam_file);
DBUG_RETURN(0);
}
- VOID(mi_lock_database(isam_file,F_WRLCK));
+ (void) mi_lock_database(isam_file,F_WRLCK);
DBUG_RETURN(isam_file);
}
@@ -473,8 +473,8 @@ static my_bool open_isam_files(PACK_MRG_INFO *mrg, char **names, uint count)
return 0;
diff_file:
- VOID(fprintf(stderr, "%s: Tables '%s' and '%s' are not identical\n",
- my_progname, names[j], names[j+1]));
+ (void) fprintf(stderr, "%s: Tables '%s' and '%s' are not identical\n",
+ my_progname, names[j], names[j+1]);
error:
while (i--)
mi_close(mrg->file[i]);
@@ -506,16 +506,16 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
/* Create temporary or join file */
if (backup)
- VOID(fn_format(org_name,isam_file->filename,"",MI_NAME_DEXT,2));
+ (void) fn_format(org_name,isam_file->filename,"",MI_NAME_DEXT,2);
else
- VOID(fn_format(org_name,isam_file->filename,"",MI_NAME_DEXT,2+4+16));
+ (void) fn_format(org_name,isam_file->filename,"",MI_NAME_DEXT,2+4+16);
if (!test_only && result_table)
{
/* Make a new indexfile based on first file in list */
uint length;
uchar *buff;
strmov(org_name,result_table); /* Fix error messages */
- VOID(fn_format(new_name,result_table,"",MI_NAME_IEXT,2));
+ (void) fn_format(new_name,result_table,"",MI_NAME_IEXT,2);
if ((join_isam_file=my_create(new_name,0,tmpfile_createflag,MYF(MY_WME)))
< 0)
goto err;
@@ -530,12 +530,12 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
goto err;
}
my_free(buff,MYF(0));
- VOID(fn_format(new_name,result_table,"",MI_NAME_DEXT,2));
+ (void) fn_format(new_name,result_table,"",MI_NAME_DEXT,2);
}
else if (!tmp_dir[0])
- VOID(make_new_name(new_name,org_name));
+ (void) make_new_name(new_name,org_name);
else
- VOID(fn_format(new_name,org_name,tmp_dir,DATA_TMP_EXT,1+2+4));
+ (void) fn_format(new_name,org_name,tmp_dir,DATA_TMP_EXT,1+2+4);
if (!test_only &&
(new_file=my_create(new_name,0,tmpfile_createflag,MYF(MY_WME))) < 0)
goto err;
@@ -551,8 +551,8 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
(ulong) mrg->records));
if (write_loop || verbose)
{
- VOID(printf("Compressing %s: (%lu records)\n",
- result_table ? new_name : org_name, (ulong) mrg->records));
+ printf("Compressing %s: (%lu records)\n",
+ result_table ? new_name : org_name, (ulong) mrg->records);
}
trees=fields=share->base.fields;
huff_counts=init_huff_count(isam_file,mrg->records);
@@ -563,7 +563,7 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
*/
DBUG_PRINT("info", ("- Calculating statistics"));
if (write_loop || verbose)
- VOID(printf("- Calculating statistics\n"));
+ printf("- Calculating statistics\n");
if (get_statistic(mrg,huff_counts))
goto err;
NORMAL_SAFEMALLOC;
@@ -613,7 +613,7 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
*/
file_buffer.pos_in_file=HEAD_LENGTH;
if (! test_only)
- VOID(my_seek(new_file,file_buffer.pos_in_file,MY_SEEK_SET,MYF(0)));
+ my_seek(new_file,file_buffer.pos_in_file,MY_SEEK_SET,MYF(0));
/*
Write field infos: field type, pack type, length bits, tree number.
@@ -639,7 +639,7 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
*/
DBUG_PRINT("info", ("- Compressing file"));
if (write_loop || verbose)
- VOID(printf("- Compressing file\n"));
+ printf("- Compressing file\n");
error=compress_isam_file(mrg,huff_counts);
new_length=file_buffer.pos_in_file;
if (!error && !test_only)
@@ -666,9 +666,9 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
mrg->min_pack_length, mrg->max_pack_length,
(ulong) (mrg->records ? (new_length/mrg->records) : 0)));
if (verbose && mrg->records)
- VOID(printf("Min record length: %6d Max length: %6d "
+ printf("Min record length: %6d Max length: %6d "
"Mean total length: %6ld\n", mrg->min_pack_length,
- mrg->max_pack_length, (ulong) (new_length/mrg->records)));
+ mrg->max_pack_length, (ulong) (new_length/mrg->records));
/* Close source and target file. */
if (!test_only)
@@ -704,9 +704,9 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
error=my_rename(new_name,org_name,MYF(MY_WME));
if (!error)
{
- VOID(my_copystat(temp_name,org_name,MYF(MY_COPYTIME)));
+ (void) my_copystat(temp_name,org_name,MYF(MY_COPYTIME));
if (tmp_dir[0])
- VOID(my_delete(new_name,MYF(MY_WME)));
+ (void) my_delete(new_name,MYF(MY_WME));
}
}
}
@@ -717,7 +717,7 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
error=my_copy(new_name,org_name,
MYF(MY_WME | MY_HOLD_ORIGINAL_MODES | MY_COPYTIME));
if (!error)
- VOID(my_delete(new_name,MYF(MY_WME)));
+ (void) my_delete(new_name,MYF(MY_WME));
}
else
error=my_redel(org_name,new_name,MYF(MY_WME | MY_COPYTIME));
@@ -731,16 +731,16 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
error|=my_close(join_isam_file,MYF(MY_WME));
if (error)
{
- VOID(fprintf(stderr, "Aborting: %s is not compressed\n", org_name));
- VOID(my_delete(new_name,MYF(MY_WME)));
+ (void) fprintf(stderr, "Aborting: %s is not compressed\n", org_name);
+ (void) my_delete(new_name,MYF(MY_WME));
DBUG_RETURN(-1);
}
if (write_loop || verbose)
{
if (old_length)
- VOID(printf("%.4g%% \n",
+ printf("%.4g%% \n",
(((longlong) (old_length - new_length)) * 100.0 /
- (longlong) old_length)));
+ (longlong) old_length));
else
puts("Empty file saved in compressed format");
}
@@ -749,11 +749,11 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
err:
free_counts_and_tree_and_queue(huff_trees,trees,huff_counts,fields);
if (new_file >= 0)
- VOID(my_close(new_file,MYF(0)));
+ (void) my_close(new_file,MYF(0));
if (join_isam_file >= 0)
- VOID(my_close(join_isam_file,MYF(0)));
+ (void) my_close(join_isam_file,MYF(0));
mrg_close(mrg);
- VOID(fprintf(stderr, "Aborted: %s is not compressed\n", org_name));
+ (void) fprintf(stderr, "Aborted: %s is not compressed\n", org_name);
DBUG_RETURN(-1);
}
@@ -1069,13 +1069,13 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
record_count++;
if (write_loop && record_count % WRITE_COUNT == 0)
{
- VOID(printf("%lu\r", (ulong) record_count));
- VOID(fflush(stdout));
+ printf("%lu\r", (ulong) record_count);
+ (void) fflush(stdout);
}
}
else if (error != HA_ERR_RECORD_DELETED)
{
- VOID(fprintf(stderr, "Got error %d while reading rows", error));
+ (void) fprintf(stderr, "Got error %d while reading rows", error);
break;
}
@@ -1083,8 +1083,8 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
}
if (write_loop)
{
- VOID(printf(" \r"));
- VOID(fflush(stdout));
+ printf(" \r");
+ (void) fflush(stdout);
}
/*
@@ -1096,8 +1096,8 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
DBUG_PRINT("info", ("Found the following number of incidents "
"of the byte codes:"));
if (verbose >= 2)
- VOID(printf("Found the following number of incidents "
- "of the byte codes:\n"));
+ printf("Found the following number of incidents "
+ "of the byte codes:\n");
for (count= huff_counts ; count < end_count; count++)
{
uint idx;
@@ -1106,16 +1106,16 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
DBUG_PRINT("info", ("column: %3u", (uint) (count - huff_counts + 1)));
if (verbose >= 2)
- VOID(printf("column: %3u\n", (uint) (count - huff_counts + 1)));
+ printf("column: %3u\n", (uint) (count - huff_counts + 1));
if (count->tree_buff)
{
DBUG_PRINT("info", ("number of distinct values: %u",
(uint) ((count->tree_pos - count->tree_buff) /
count->field_length)));
if (verbose >= 2)
- VOID(printf("number of distinct values: %u\n",
+ printf("number of distinct values: %u\n",
(uint) ((count->tree_pos - count->tree_buff) /
- count->field_length)));
+ count->field_length));
}
total_count= 0;
for (idx= 0; idx < 256; idx++)
@@ -1126,16 +1126,16 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
DBUG_PRINT("info", ("counts[0x%02x]: %12s", idx,
llstr((longlong) count->counts[idx], llbuf)));
if (verbose >= 2)
- VOID(printf("counts[0x%02x]: %12s\n", idx,
- llstr((longlong) count->counts[idx], llbuf)));
+ printf("counts[0x%02x]: %12s\n", idx,
+ llstr((longlong) count->counts[idx], llbuf));
}
}
DBUG_PRINT("info", ("total: %12s", llstr((longlong) total_count,
llbuf)));
if ((verbose >= 2) && total_count)
{
- VOID(printf("total: %12s\n",
- llstr((longlong) total_count, llbuf)));
+ printf("total: %12s\n",
+ llstr((longlong) total_count, llbuf));
}
}
@@ -1352,7 +1352,7 @@ static void check_counts(HUFF_COUNTS *huff_counts, uint trees,
field_count[FIELD_INTERVALL],
field_count[FIELD_ZERO]));
if (verbose)
- VOID(printf("\nnormal: %3d empty-space: %3d "
+ printf("\nnormal: %3d empty-space: %3d "
"empty-zero: %3d empty-fill: %3d\n"
"pre-space: %3d end-space: %3d "
"intervall-fields: %3d zero: %3d\n",
@@ -1361,7 +1361,7 @@ static void check_counts(HUFF_COUNTS *huff_counts, uint trees,
field_count[FIELD_SKIP_PRESPACE],
field_count[FIELD_SKIP_ENDSPACE],
field_count[FIELD_INTERVALL],
- field_count[FIELD_ZERO]));
+ field_count[FIELD_ZERO]);
DBUG_VOID_RETURN;
}
@@ -1876,7 +1876,7 @@ static uint join_same_trees(HUFF_COUNTS *huff_counts, uint trees)
DBUG_PRINT("info", ("Original trees: %d After join: %d",
trees, tree_number));
if (verbose)
- VOID(printf("Original trees: %d After join: %d\n", trees, tree_number));
+ printf("Original trees: %d After join: %d\n", trees, tree_number);
return tree_number; /* Return trees left */
}
@@ -2022,7 +2022,7 @@ static int write_header(PACK_MRG_INFO *mrg,uint head_length,uint trees,
buff[27]= (uchar) mi_get_pointer_length((ulonglong) filelength,2);
if (test_only)
return 0;
- VOID(my_seek(file_buffer.file,0L,MY_SEEK_SET,MYF(0)));
+ my_seek(file_buffer.file,0L,MY_SEEK_SET,MYF(0));
return my_write(file_buffer.file,(const uchar *) file_buffer.pos,HEAD_LENGTH,
MYF(MY_WME | MY_NABP | MY_WAIT_IF_FULL)) != 0;
}
@@ -2055,24 +2055,24 @@ static void write_field_info(HUFF_COUNTS *counts, uint fields, uint trees)
DBUG_PRINT("info", (" "));
if (verbose >= 2)
{
- VOID(printf("\n"));
- VOID(printf("column types:\n"));
- VOID(printf("FIELD_NORMAL 0\n"));
- VOID(printf("FIELD_SKIP_ENDSPACE 1\n"));
- VOID(printf("FIELD_SKIP_PRESPACE 2\n"));
- VOID(printf("FIELD_SKIP_ZERO 3\n"));
- VOID(printf("FIELD_BLOB 4\n"));
- VOID(printf("FIELD_CONSTANT 5\n"));
- VOID(printf("FIELD_INTERVALL 6\n"));
- VOID(printf("FIELD_ZERO 7\n"));
- VOID(printf("FIELD_VARCHAR 8\n"));
- VOID(printf("FIELD_CHECK 9\n"));
- VOID(printf("\n"));
- VOID(printf("pack type as a set of flags:\n"));
- VOID(printf("PACK_TYPE_SELECTED 1\n"));
- VOID(printf("PACK_TYPE_SPACE_FIELDS 2\n"));
- VOID(printf("PACK_TYPE_ZERO_FILL 4\n"));
- VOID(printf("\n"));
+ printf("\n");
+ printf("column types:\n");
+ printf("FIELD_NORMAL 0\n");
+ printf("FIELD_SKIP_ENDSPACE 1\n");
+ printf("FIELD_SKIP_PRESPACE 2\n");
+ printf("FIELD_SKIP_ZERO 3\n");
+ printf("FIELD_BLOB 4\n");
+ printf("FIELD_CONSTANT 5\n");
+ printf("FIELD_INTERVALL 6\n");
+ printf("FIELD_ZERO 7\n");
+ printf("FIELD_VARCHAR 8\n");
+ printf("FIELD_CHECK 9\n");
+ printf("\n");
+ printf("pack type as a set of flags:\n");
+ printf("PACK_TYPE_SELECTED 1\n");
+ printf("PACK_TYPE_SPACE_FIELDS 2\n");
+ printf("PACK_TYPE_ZERO_FILL 4\n");
+ printf("\n");
}
for (i=0 ; i++ < fields ; counts++)
{
@@ -2089,10 +2089,10 @@ static void write_field_info(HUFF_COUNTS *counts, uint fields, uint trees)
counts->max_zero_fill, counts->length_bits,
counts->tree->tree_number, counts->field_length));
if (verbose >= 2)
- VOID(printf("column: %3u type: %2u pack: %2u zero: %4u lbits: %2u "
+ printf("column: %3u type: %2u pack: %2u zero: %4u lbits: %2u "
"tree: %2u length: %4u\n", i , counts->field_type,
counts->pack_type, counts->max_zero_fill, counts->length_bits,
- counts->tree->tree_number, counts->field_length));
+ counts->tree->tree_number, counts->field_length);
}
flush_bits();
return;
@@ -2127,7 +2127,7 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
DBUG_PRINT("info", (" "));
if (verbose >= 2)
- VOID(printf("\n"));
+ printf("\n");
tree_no= 0;
intervall_length=0;
for (elements=0; trees-- ; huff_tree++)
@@ -2138,7 +2138,7 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
tree_no++;
DBUG_PRINT("info", (" "));
if (verbose >= 3)
- VOID(printf("\n"));
+ printf("\n");
/* Count the total number of elements (byte codes or column values). */
elements+=huff_tree->elements;
huff_tree->max_offset=2;
@@ -2157,8 +2157,8 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
*/
if (huff_tree->max_offset >= IS_OFFSET)
{ /* This should be impossible */
- VOID(fprintf(stderr, "Tree offset got too big: %d, aborted\n",
- huff_tree->max_offset));
+ (void) fprintf(stderr, "Tree offset got too big: %d, aborted\n",
+ huff_tree->max_offset);
my_afree((uchar*) packed_tree);
return 0;
}
@@ -2197,19 +2197,19 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
"bufflen" : "min_chr", huff_tree->counts->tree_buff ?
int_length : huff_tree->min_chr, huff_tree->height));
if (verbose >= 2)
- VOID(printf("tree: %2u elements: %4u char_bits: %2u offset_bits: %2u "
+ printf("tree: %2u elements: %4u char_bits: %2u offset_bits: %2u "
"%s: %5u codelen: %2u\n", tree_no, huff_tree->elements,
huff_tree->char_bits, huff_tree->offset_bits,
huff_tree->counts->tree_buff ? "bufflen" : "min_chr",
huff_tree->counts->tree_buff ? int_length :
- huff_tree->min_chr, huff_tree->height));
+ huff_tree->min_chr, huff_tree->height);
/* Check that the code tree length matches the element count. */
length=(uint) (offset-packed_tree);
if (length != huff_tree->elements*2-2)
{
- VOID(fprintf(stderr, "error: Huff-tree-length: %d != calc_length: %d\n",
- length, huff_tree->elements * 2 - 2));
+ (void) fprintf(stderr, "error: Huff-tree-length: %d != calc_length: %d\n",
+ length, huff_tree->elements * 2 - 2);
errors++;
break;
}
@@ -2226,10 +2226,10 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
" -> " : "", (packed_tree[i] & IS_OFFSET) ?
packed_tree[i] - IS_OFFSET + i : packed_tree[i]));
if (verbose >= 3)
- VOID(printf("tree[0x%04x]: %s0x%04x\n",
+ printf("tree[0x%04x]: %s0x%04x\n",
i, (packed_tree[i] & IS_OFFSET) ? " -> " : "",
(packed_tree[i] & IS_OFFSET) ?
- packed_tree[i] - IS_OFFSET + i : packed_tree[i]));
+ packed_tree[i] - IS_OFFSET + i : packed_tree[i]);
}
flush_bits();
@@ -2251,9 +2251,9 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
bindigits(huff_tree->code[i],
huff_tree->code_len[i])));
if (verbose >= 3)
- VOID(printf("code[0x%04x]: 0x%s bits: %2u bin: %s\n", i,
+ printf("code[0x%04x]: 0x%s bits: %2u bin: %s\n", i,
hexdigits(huff_tree->code[i]), huff_tree->code_len[i],
- bindigits(huff_tree->code[i], huff_tree->code_len[i])));
+ bindigits(huff_tree->code[i], huff_tree->code_len[i]));
/* Check that the encode table decodes correctly. */
code= 0;
@@ -2266,9 +2266,9 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
{
if (! len)
{
- VOID(fflush(stdout));
- VOID(fprintf(stderr, "error: code 0x%s with %u bits not found\n",
- hexdigits(huff_tree->code[i]), huff_tree->code_len[i]));
+ (void) fflush(stdout);
+ (void) fprintf(stderr, "error: code 0x%s with %u bits not found\n",
+ hexdigits(huff_tree->code[i]), huff_tree->code_len[i]);
errors++;
break;
}
@@ -2277,18 +2277,18 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
bits++;
if (bits > 8 * sizeof(code))
{
- VOID(fflush(stdout));
- VOID(fprintf(stderr, "error: Huffman code too long: %u/%u\n",
- bits, (uint) (8 * sizeof(code))));
+ (void) fflush(stdout);
+ (void) fprintf(stderr, "error: Huffman code too long: %u/%u\n",
+ bits, (uint) (8 * sizeof(code)));
errors++;
break;
}
idx+= (uint) code & 1;
if (idx >= length)
{
- VOID(fflush(stdout));
- VOID(fprintf(stderr, "error: illegal tree offset: %u/%u\n",
- idx, length));
+ (void) fflush(stdout);
+ (void) fprintf(stderr, "error: illegal tree offset: %u/%u\n",
+ idx, length);
errors++;
break;
}
@@ -2303,9 +2303,9 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
DBUG_EXECUTE_IF("forcechkerr4", packed_tree[idx]++;);
if (packed_tree[idx] != i)
{
- VOID(fflush(stdout));
- VOID(fprintf(stderr, "error: decoded value 0x%04x should be: 0x%04x\n",
- packed_tree[idx], i));
+ (void) fflush(stdout);
+ (void) fprintf(stderr, "error: decoded value 0x%04x should be: 0x%04x\n",
+ packed_tree[idx], i);
errors++;
break;
}
@@ -2322,19 +2322,19 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
DBUG_PRINT("info", ("column_values[0x%04x]: 0x%02x",
i, (uchar) huff_tree->counts->tree_buff[i]));
if (verbose >= 3)
- VOID(printf("column_values[0x%04x]: 0x%02x\n",
- i, (uchar) huff_tree->counts->tree_buff[i]));
+ printf("column_values[0x%04x]: 0x%02x\n",
+ i, (uchar) huff_tree->counts->tree_buff[i]);
}
}
flush_bits();
}
DBUG_PRINT("info", (" "));
if (verbose >= 2)
- VOID(printf("\n"));
+ printf("\n");
my_afree((uchar*) packed_tree);
if (errors)
{
- VOID(fprintf(stderr, "Error: Generated decode trees are corrupt. Stop.\n"));
+ (void) fprintf(stderr, "Error: Generated decode trees are corrupt. Stop.\n");
return 0;
}
return elements;
@@ -2756,8 +2756,8 @@ static int compress_isam_file(PACK_MRG_INFO *mrg, HUFF_COUNTS *huff_counts)
record_count++;
if (write_loop && record_count % WRITE_COUNT == 0)
{
- VOID(printf("%lu\r", (ulong) record_count));
- VOID(fflush(stdout));
+ printf("%lu\r", (ulong) record_count);
+ (void) fflush(stdout);
}
}
else if (error != HA_ERR_RECORD_DELETED)
@@ -2767,11 +2767,11 @@ static int compress_isam_file(PACK_MRG_INFO *mrg, HUFF_COUNTS *huff_counts)
error=0;
else
{
- VOID(fprintf(stderr, "%s: Got error %d reading records\n",
- my_progname, error));
+ (void) fprintf(stderr, "%s: Got error %d reading records\n",
+ my_progname, error);
}
if (verbose >= 2)
- VOID(printf("wrote %s records.\n", llstr((longlong) record_count, llbuf)));
+ printf("wrote %s records.\n", llstr((longlong) record_count, llbuf));
my_afree((uchar*) record);
mrg->ref_length=max_pack_length;
@@ -2901,7 +2901,7 @@ static void write_bits(register ulonglong value, register uint bits)
if (bits != 8 * sizeof(value))
value&= (((ulonglong) 1) << bits) - 1;
if (file_buffer.pos >= file_buffer.end)
- VOID(flush_buffer(~ (ulong) 0));
+ (void) flush_buffer(~ (ulong) 0);
file_buffer.bits=(int) (BITS_SAVED - bits);
file_buffer.bitbucket= value << (BITS_SAVED - bits);
}
@@ -2924,7 +2924,7 @@ static void flush_bits(void)
*file_buffer.pos++= (uchar) (bit_buffer >> bits);
}
if (file_buffer.pos >= file_buffer.end)
- VOID(flush_buffer(~ (ulong) 0));
+ (void) flush_buffer(~ (ulong) 0);
file_buffer.bits= BITS_SAVED;
file_buffer.bitbucket= 0;
}
@@ -2974,7 +2974,7 @@ static int save_state(MI_INFO *isam_file,PACK_MRG_INFO *mrg,my_off_t new_length,
share->changed=1; /* Force write of header */
share->state.open_count=0;
share->global_changed=0;
- VOID(my_chsize(share->kfile, share->base.keystart, 0, MYF(0)));
+ (void) my_chsize(share->kfile, share->base.keystart, 0, MYF(0));
if (share->base.keys)
isamchk_neaded=1;
DBUG_RETURN(mi_state_info_write(share->kfile,&share->state,1+2));
diff --git a/storage/myisam/sort.c b/storage/myisam/sort.c
index b450d27de66..670b5f4a30f 100644
--- a/storage/myisam/sort.c
+++ b/storage/myisam/sort.c
@@ -970,7 +970,7 @@ merge_buffers(MI_SORT_PARAM *info, uint keys, IO_CACHE *from_file,
uchar *base=buffpek->base;
uint max_keys=buffpek->max_keys;
- VOID(queue_remove(&queue,0));
+ (void) queue_remove(&queue,0);
/* Put room used by buffer to use in other buffer */
for (refpek= (BUFFPEK**) &queue_top(&queue);