summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-05-22 19:11:06 +0300
committerunknown <monty@hundin.mysql.fi>2002-05-22 19:11:06 +0300
commitc8e93fd78762c3436593085ce4d7e0988c0c8671 (patch)
tree7dc30df21813cc17f1c616c7c6eb19d9be0deefa
parent3181a6af1b782ccbd23cd12b8e39e8e282b482e7 (diff)
downloadmariadb-git-c8e93fd78762c3436593085ce4d7e0988c0c8671.tar.gz
Removed compiler warnings
myisam/mi_write.c: More DBUG_ statements
-rw-r--r--client/mysqltest.c10
-rw-r--r--myisam/mi_write.c16
-rw-r--r--tools/mysqlmanager.c6
3 files changed, 17 insertions, 15 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index a161b9352d4..3534f2e40b2 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -661,7 +661,7 @@ int open_file(const char* name)
}
/* ugly long name, but we are following the convention */
-int do_wait_for_slave_to_stop(struct st_query* __attribute__((unused)) q)
+int do_wait_for_slave_to_stop(struct st_query* q __attribute__((unused)))
{
MYSQL* mysql = &cur_con->mysql;
#ifndef OS2
@@ -699,7 +699,7 @@ int do_wait_for_slave_to_stop(struct st_query* __attribute__((unused)) q)
return 0;
}
-int do_require_manager(struct st_query* __attribute__((unused)) q)
+int do_require_manager(struct st_query* a __attribute__((unused)))
{
if (!manager)
abort_not_supported_test();
@@ -1022,20 +1022,20 @@ int do_let(struct st_query* q)
return var_set(var_name, var_name_end, var_val_start, q->end);
}
-int do_rpl_probe(struct st_query* __attribute__((unused)) q)
+int do_rpl_probe(struct st_query* q __attribute__((unused)))
{
if(mysql_rpl_probe(&cur_con->mysql))
die("Failed in mysql_rpl_probe(): %s", mysql_error(&cur_con->mysql));
return 0;
}
-int do_enable_rpl_parse(struct st_query* __attribute__((unused)) q)
+int do_enable_rpl_parse(struct st_query* q __attribute__((unused)))
{
mysql_enable_rpl_parse(&cur_con->mysql);
return 0;
}
-int do_disable_rpl_parse(struct st_query* __attribute__((unused)) q)
+int do_disable_rpl_parse(struct st_query* q __attribute__((unused)))
{
mysql_disable_rpl_parse(&cur_con->mysql);
return 0;
diff --git a/myisam/mi_write.c b/myisam/mi_write.c
index 5a2711aac92..94b9c78707e 100644
--- a/myisam/mi_write.c
+++ b/myisam/mi_write.c
@@ -397,7 +397,7 @@ int _mi_insert(register MI_INFO *info, register MI_KEYDEF *keyinfo,
{
DBUG_PRINT("test",("t_length: %d ref_len: %d",
t_length,s_temp.ref_length));
- DBUG_PRINT("test",("n_ref_len: %d n_length: %d key: %lx",
+ DBUG_PRINT("test",("n_ref_len: %d n_length: %d key_pos: %lx",
s_temp.n_ref_length,s_temp.n_length,s_temp.key));
}
#endif
@@ -758,6 +758,7 @@ int _mi_ck_write_tree(register MI_INFO *info, uint keynr, uchar *key,
/* typeof(_mi_keys_compare)=qsort_cmp2 */
+
static int keys_compare(bulk_insert_param *param, uchar *key1, uchar *key2)
{
uint not_used;
@@ -807,9 +808,10 @@ int _mi_init_bulk_insert(MI_INFO *info)
bulk_insert_param *params;
uint i, num_keys;
ulonglong key_map=0;
+ DBUG_ENTER("_mi_init_bulk_insert");
if (info->bulk_insert)
- return 0;
+ DBUG_RETURN(0);
for (i=num_keys=0 ; i < share->base.keys ; i++)
{
@@ -821,15 +823,15 @@ int _mi_init_bulk_insert(MI_INFO *info)
}
}
- if (num_keys==0 || num_keys>myisam_bulk_insert_tree_size)
- return 0;
+ if (num_keys==0 || num_keys > myisam_bulk_insert_tree_size)
+ DBUG_RETURN(0);
info->bulk_insert=(TREE *)
my_malloc((sizeof(TREE)*share->base.keys+
sizeof(bulk_insert_param)*num_keys),MYF(0));
if (!info->bulk_insert)
- return HA_ERR_OUT_OF_MEM;
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
params=(bulk_insert_param *)(info->bulk_insert+share->base.keys);
for (i=0 ; i < share->base.keys ; i++,key++)
@@ -838,7 +840,7 @@ int _mi_init_bulk_insert(MI_INFO *info)
{
params->info=info;
params->keynr=i;
- init_tree(& info->bulk_insert[i],
+ init_tree(&info->bulk_insert[i],
myisam_bulk_insert_tree_size / num_keys / 4 + 10,
myisam_bulk_insert_tree_size / num_keys, 0,
(qsort_cmp2)keys_compare, 0,
@@ -848,5 +850,5 @@ int _mi_init_bulk_insert(MI_INFO *info)
info->bulk_insert[i].root=0;
}
- return 0;
+ DBUG_RETURN(0);
}
diff --git a/tools/mysqlmanager.c b/tools/mysqlmanager.c
index bd43c6bc0ec..4f166b2f4df 100644
--- a/tools/mysqlmanager.c
+++ b/tools/mysqlmanager.c
@@ -232,8 +232,8 @@ static int set_exec_param(struct manager_thd* thd, char* args_start,
#define HANDLE_DECL(com) static int com (struct manager_thd* thd, char* args_start,char* args_end)
#define HANDLE_NOARG_DECL(com) static int com \
- (struct manager_thd* thd, char* __attribute__((unused)) args_start,\
- char* __attribute__((unused)) args_end)
+ (struct manager_thd* thd, char *args_start __attribute__((unused)),\
+ char* args_end __attribute__((unused)))
HANDLE_NOARG_DECL(handle_ping);
@@ -1063,7 +1063,7 @@ static void log_msg(const char* fmt, int msg_type, va_list args)
}
static pthread_handler_decl(process_launcher_messages,
- __attribute__((unused)) arg)
+ args __attribute__((unused)))
{
my_thread_init();
for (;!in_shutdown;)