Commit cee1471f authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi

Removed compiler warnings

parent cca212ff
...@@ -661,7 +661,7 @@ int open_file(const char* name) ...@@ -661,7 +661,7 @@ int open_file(const char* name)
} }
/* ugly long name, but we are following the convention */ /* 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; MYSQL* mysql = &cur_con->mysql;
#ifndef OS2 #ifndef OS2
...@@ -699,7 +699,7 @@ int do_wait_for_slave_to_stop(struct st_query* __attribute__((unused)) q) ...@@ -699,7 +699,7 @@ int do_wait_for_slave_to_stop(struct st_query* __attribute__((unused)) q)
return 0; return 0;
} }
int do_require_manager(struct st_query* __attribute__((unused)) q) int do_require_manager(struct st_query* a __attribute__((unused)))
{ {
if (!manager) if (!manager)
abort_not_supported_test(); abort_not_supported_test();
...@@ -1022,20 +1022,20 @@ int do_let(struct st_query* q) ...@@ -1022,20 +1022,20 @@ int do_let(struct st_query* q)
return var_set(var_name, var_name_end, var_val_start, q->end); 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)) if(mysql_rpl_probe(&cur_con->mysql))
die("Failed in mysql_rpl_probe(): %s", mysql_error(&cur_con->mysql)); die("Failed in mysql_rpl_probe(): %s", mysql_error(&cur_con->mysql));
return 0; 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); mysql_enable_rpl_parse(&cur_con->mysql);
return 0; 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); mysql_disable_rpl_parse(&cur_con->mysql);
return 0; return 0;
......
...@@ -397,7 +397,7 @@ int _mi_insert(register MI_INFO *info, register MI_KEYDEF *keyinfo, ...@@ -397,7 +397,7 @@ int _mi_insert(register MI_INFO *info, register MI_KEYDEF *keyinfo,
{ {
DBUG_PRINT("test",("t_length: %d ref_len: %d", DBUG_PRINT("test",("t_length: %d ref_len: %d",
t_length,s_temp.ref_length)); 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)); s_temp.n_ref_length,s_temp.n_length,s_temp.key));
} }
#endif #endif
...@@ -758,6 +758,7 @@ int _mi_ck_write_tree(register MI_INFO *info, uint keynr, uchar *key, ...@@ -758,6 +758,7 @@ int _mi_ck_write_tree(register MI_INFO *info, uint keynr, uchar *key,
/* typeof(_mi_keys_compare)=qsort_cmp2 */ /* typeof(_mi_keys_compare)=qsort_cmp2 */
static int keys_compare(bulk_insert_param *param, uchar *key1, uchar *key2) static int keys_compare(bulk_insert_param *param, uchar *key1, uchar *key2)
{ {
uint not_used; uint not_used;
...@@ -807,9 +808,10 @@ int _mi_init_bulk_insert(MI_INFO *info) ...@@ -807,9 +808,10 @@ int _mi_init_bulk_insert(MI_INFO *info)
bulk_insert_param *params; bulk_insert_param *params;
uint i, num_keys; uint i, num_keys;
ulonglong key_map=0; ulonglong key_map=0;
DBUG_ENTER("_mi_init_bulk_insert");
if (info->bulk_insert) if (info->bulk_insert)
return 0; DBUG_RETURN(0);
for (i=num_keys=0 ; i < share->base.keys ; i++) for (i=num_keys=0 ; i < share->base.keys ; i++)
{ {
...@@ -821,15 +823,15 @@ int _mi_init_bulk_insert(MI_INFO *info) ...@@ -821,15 +823,15 @@ int _mi_init_bulk_insert(MI_INFO *info)
} }
} }
if (num_keys==0 || num_keys>myisam_bulk_insert_tree_size) if (num_keys==0 || num_keys > myisam_bulk_insert_tree_size)
return 0; DBUG_RETURN(0);
info->bulk_insert=(TREE *) info->bulk_insert=(TREE *)
my_malloc((sizeof(TREE)*share->base.keys+ my_malloc((sizeof(TREE)*share->base.keys+
sizeof(bulk_insert_param)*num_keys),MYF(0)); sizeof(bulk_insert_param)*num_keys),MYF(0));
if (!info->bulk_insert) 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); params=(bulk_insert_param *)(info->bulk_insert+share->base.keys);
for (i=0 ; i < share->base.keys ; i++,key++) for (i=0 ; i < share->base.keys ; i++,key++)
...@@ -838,7 +840,7 @@ int _mi_init_bulk_insert(MI_INFO *info) ...@@ -838,7 +840,7 @@ int _mi_init_bulk_insert(MI_INFO *info)
{ {
params->info=info; params->info=info;
params->keynr=i; 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 / 4 + 10,
myisam_bulk_insert_tree_size / num_keys, 0, myisam_bulk_insert_tree_size / num_keys, 0,
(qsort_cmp2)keys_compare, 0, (qsort_cmp2)keys_compare, 0,
...@@ -848,5 +850,5 @@ int _mi_init_bulk_insert(MI_INFO *info) ...@@ -848,5 +850,5 @@ int _mi_init_bulk_insert(MI_INFO *info)
info->bulk_insert[i].root=0; info->bulk_insert[i].root=0;
} }
return 0; DBUG_RETURN(0);
} }
...@@ -232,8 +232,8 @@ static int set_exec_param(struct manager_thd* thd, char* args_start, ...@@ -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_DECL(com) static int com (struct manager_thd* thd, char* args_start,char* args_end)
#define HANDLE_NOARG_DECL(com) static int com \ #define HANDLE_NOARG_DECL(com) static int com \
(struct manager_thd* thd, char* __attribute__((unused)) args_start,\ (struct manager_thd* thd, char *args_start __attribute__((unused)),\
char* __attribute__((unused)) args_end) char* args_end __attribute__((unused)))
HANDLE_NOARG_DECL(handle_ping); HANDLE_NOARG_DECL(handle_ping);
...@@ -1063,7 +1063,7 @@ static void log_msg(const char* fmt, int msg_type, va_list args) ...@@ -1063,7 +1063,7 @@ static void log_msg(const char* fmt, int msg_type, va_list args)
} }
static pthread_handler_decl(process_launcher_messages, static pthread_handler_decl(process_launcher_messages,
__attribute__((unused)) arg) args __attribute__((unused)))
{ {
my_thread_init(); my_thread_init();
for (;!in_shutdown;) for (;!in_shutdown;)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment