Skip to content

Commit d60a46d

Browse files
author
Davi Arnaut
committed
Merge of mysql-5.5-bugteam into mysql-trunk-merge.
2 parents 07c0796 + 69aea87 commit d60a46d

File tree

12 files changed

+69
-47
lines changed

12 files changed

+69
-47
lines changed

client/mysql.cc

+10-5
Original file line numberDiff line numberDiff line change
@@ -3739,7 +3739,8 @@ print_tab_data(MYSQL_RES *result)
37393739
}
37403740

37413741
static int
3742-
com_tee(String *buffer, char *line __attribute__((unused)))
3742+
com_tee(String *buffer __attribute__((unused)),
3743+
char *line __attribute__((unused)))
37433744
{
37443745
char file_name[FN_REFLEN], *end, *param;
37453746

@@ -3798,7 +3799,8 @@ com_notee(String *buffer __attribute__((unused)),
37983799

37993800
#ifdef USE_POPEN
38003801
static int
3801-
com_pager(String *buffer, char *line __attribute__((unused)))
3802+
com_pager(String *buffer __attribute__((unused)),
3803+
char *line __attribute__((unused)))
38023804
{
38033805
char pager_name[FN_REFLEN], *end, *param;
38043806

@@ -3923,7 +3925,8 @@ com_rehash(String *buffer __attribute__((unused)),
39233925

39243926
#ifdef USE_POPEN
39253927
static int
3926-
com_shell(String *buffer, char *line __attribute__((unused)))
3928+
com_shell(String *buffer __attribute__((unused)),
3929+
char *line __attribute__((unused)))
39273930
{
39283931
char *shell_cmd;
39293932

@@ -4015,7 +4018,8 @@ com_connect(String *buffer, char *line)
40154018
}
40164019

40174020

4018-
static int com_source(String *buffer, char *line)
4021+
static int com_source(String *buffer __attribute__((unused)),
4022+
char *line)
40194023
{
40204024
char source_name[FN_REFLEN], *end, *param;
40214025
LINE_BUFFER *line_buff;
@@ -4929,7 +4933,8 @@ static void init_username()
49294933
}
49304934
}
49314935

4932-
static int com_prompt(String *buffer, char *line)
4936+
static int com_prompt(String *buffer __attribute__((unused)),
4937+
char *line)
49334938
{
49344939
char *ptr=strchr(line, ' ');
49354940
prompt_counter = 0;

client/sql_string.h

+7-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,13 @@ class String
6969
}
7070
static void *operator new(size_t size, MEM_ROOT *mem_root)
7171
{ return (void*) alloc_root(mem_root, (uint) size); }
72-
static void operator delete(void *ptr_arg,size_t size)
73-
{ TRASH(ptr_arg, size); }
74-
static void operator delete(void *ptr_arg, MEM_ROOT *mem_root)
72+
static void operator delete(void *ptr_arg, size_t size)
73+
{
74+
(void) ptr_arg;
75+
(void) size;
76+
TRASH(ptr_arg, size);
77+
}
78+
static void operator delete(void *, MEM_ROOT *)
7579
{ /* never called */ }
7680
~String() { free(); }
7781

cmd-line-utils/libedit/common.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ ed_delete_prev_word(EditLine *el, int c __attribute__((__unused__)))
136136
*/
137137
protected el_action_t
138138
/*ARGSUSED*/
139-
ed_delete_next_char(EditLine *el, int c)
139+
ed_delete_next_char(EditLine *el, int c __attribute__((__unused__)))
140140
{
141141
#ifdef notdef /* XXX */
142142
#define EL el->el_line
@@ -431,7 +431,8 @@ ed_argument_digit(EditLine *el, int c)
431431
*/
432432
protected el_action_t
433433
/*ARGSUSED*/
434-
ed_unassigned(EditLine *el, int c __attribute__((__unused__)))
434+
ed_unassigned(EditLine *el __attribute__((__unused__)),
435+
int c __attribute__((__unused__)))
435436
{
436437

437438
return (CC_ERROR);

cmd-line-utils/libedit/readline.c

+15-8
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ _move_history(int op)
202202
*/
203203
static int
204204
/*ARGSUSED*/
205-
_getc_function(EditLine *el, char *c)
205+
_getc_function(EditLine *el __attribute__((__unused__)), char *c)
206206
{
207207
int i;
208208

@@ -1613,7 +1613,8 @@ rl_insert(int count, int c)
16131613

16141614
/*ARGSUSED*/
16151615
int
1616-
rl_newline(int count, int c)
1616+
rl_newline(int count __attribute__((__unused__)),
1617+
int c __attribute__((__unused__)))
16171618
{
16181619
/*
16191620
* Readline-4.0 appears to ignore the args.
@@ -1623,7 +1624,7 @@ rl_newline(int count, int c)
16231624

16241625
/*ARGSUSED*/
16251626
static unsigned char
1626-
rl_bind_wrapper(EditLine *el, unsigned char c)
1627+
rl_bind_wrapper(EditLine *el __attribute__((__unused__)), unsigned char c)
16271628
{
16281629
if (map[c] == NULL)
16291630
return CC_ERROR;
@@ -1718,7 +1719,7 @@ rl_get_previous_history(int count, int key)
17181719

17191720
void
17201721
/*ARGSUSED*/
1721-
rl_prep_terminal(int meta_flag)
1722+
rl_prep_terminal(int meta_flag __attribute__((__unused__)))
17221723
{
17231724
el_set(e, EL_PREP_TERM, 1);
17241725
}
@@ -1922,7 +1923,8 @@ _rl_qsort_string_compare(char **s1, char **s2)
19221923

19231924
int
19241925
/*ARGSUSED*/
1925-
rl_kill_text(int from, int to)
1926+
rl_kill_text(int from __attribute__((__unused__)),
1927+
int to __attribute__((__unused__)))
19261928
{
19271929
return 0;
19281930
}
@@ -1941,20 +1943,25 @@ rl_get_keymap(void)
19411943

19421944
void
19431945
/*ARGSUSED*/
1944-
rl_set_keymap(Keymap k)
1946+
rl_set_keymap(Keymap k __attribute__((__unused__)))
19451947
{
19461948
}
19471949

19481950
int
19491951
/*ARGSUSED*/
1950-
rl_generic_bind(int type, const char * keyseq, const char * data, Keymap k)
1952+
rl_generic_bind(int type __attribute__((__unused__)),
1953+
const char * keyseq __attribute__((__unused__)),
1954+
const char * data __attribute__((__unused__)),
1955+
Keymap k __attribute__((__unused__)))
19511956
{
19521957
return 0;
19531958
}
19541959

19551960
int
19561961
/*ARGSUSED*/
1957-
rl_bind_key_in_map(int key, Function *fun, Keymap k)
1962+
rl_bind_key_in_map(int key __attribute__((__unused__)),
1963+
Function *fun __attribute__((__unused__)),
1964+
Keymap k __attribute__((__unused__)))
19581965
{
19591966
return 0;
19601967
}

cmd-line-utils/libedit/vi.c

+15-14
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ vi_paste_prev(EditLine *el, int c __attribute__((__unused__)))
145145
*/
146146
protected el_action_t
147147
/*ARGSUSED*/
148-
vi_prev_big_word(EditLine *el, int c)
148+
vi_prev_big_word(EditLine *el, int c __attribute__((__unused__)))
149149
{
150150

151151
if (el->el_line.cursor == el->el_line.buffer)
@@ -195,7 +195,7 @@ vi_prev_word(EditLine *el, int c __attribute__((__unused__)))
195195
*/
196196
protected el_action_t
197197
/*ARGSUSED*/
198-
vi_next_big_word(EditLine *el, int c)
198+
vi_next_big_word(EditLine *el, int c __attribute__((__unused__)))
199199
{
200200

201201
if (el->el_line.cursor >= el->el_line.lastchar - 1)
@@ -462,7 +462,7 @@ vi_delete_meta(EditLine *el, int c __attribute__((__unused__)))
462462
*/
463463
protected el_action_t
464464
/*ARGSUSED*/
465-
vi_end_big_word(EditLine *el, int c)
465+
vi_end_big_word(EditLine *el, int c __attribute__((__unused__)))
466466
{
467467

468468
if (el->el_line.cursor == el->el_line.lastchar)
@@ -797,7 +797,7 @@ vi_repeat_prev_char(EditLine *el, int c __attribute__((__unused__)))
797797
*/
798798
protected el_action_t
799799
/*ARGSUSED*/
800-
vi_match(EditLine *el, int c)
800+
vi_match(EditLine *el, int c __attribute__((__unused__)))
801801
{
802802
const char match_chars[] = "()[]{}";
803803
char *cp;
@@ -844,7 +844,7 @@ vi_match(EditLine *el, int c)
844844
*/
845845
protected el_action_t
846846
/*ARGSUSED*/
847-
vi_undo_line(EditLine *el, int c)
847+
vi_undo_line(EditLine *el, int c __attribute__((__unused__)))
848848
{
849849

850850
cv_undo(el);
@@ -858,7 +858,7 @@ vi_undo_line(EditLine *el, int c)
858858
*/
859859
protected el_action_t
860860
/*ARGSUSED*/
861-
vi_to_column(EditLine *el, int c)
861+
vi_to_column(EditLine *el, int c __attribute__((__unused__)))
862862
{
863863

864864
el->el_line.cursor = el->el_line.buffer;
@@ -872,7 +872,7 @@ vi_to_column(EditLine *el, int c)
872872
*/
873873
protected el_action_t
874874
/*ARGSUSED*/
875-
vi_yank_end(EditLine *el, int c)
875+
vi_yank_end(EditLine *el, int c __attribute__((__unused__)))
876876
{
877877

878878
cv_yank(el, el->el_line.cursor,
@@ -886,7 +886,7 @@ vi_yank_end(EditLine *el, int c)
886886
*/
887887
protected el_action_t
888888
/*ARGSUSED*/
889-
vi_yank(EditLine *el, int c)
889+
vi_yank(EditLine *el, int c __attribute__((__unused__)))
890890
{
891891

892892
return cv_action(el, YANK);
@@ -898,7 +898,7 @@ vi_yank(EditLine *el, int c)
898898
*/
899899
protected el_action_t
900900
/*ARGSUSED*/
901-
vi_comment_out(EditLine *el, int c)
901+
vi_comment_out(EditLine *el, int c __attribute__((__unused__)))
902902
{
903903

904904
el->el_line.cursor = el->el_line.buffer;
@@ -919,7 +919,8 @@ extern char *get_alias_text(const char *) __weak_reference(get_alias_text);
919919
#endif
920920
protected el_action_t
921921
/*ARGSUSED*/
922-
vi_alias(EditLine *el, int c)
922+
vi_alias(EditLine *el __attribute__((__unused__)),
923+
int c __attribute__((__unused__)))
923924
{
924925
#if defined(__weak_reference) && !defined(__FreeBSD__)
925926
char alias_name[3];
@@ -949,7 +950,7 @@ vi_alias(EditLine *el, int c)
949950
*/
950951
protected el_action_t
951952
/*ARGSUSED*/
952-
vi_to_history_line(EditLine *el, int c)
953+
vi_to_history_line(EditLine *el, int c __attribute__((__unused__)))
953954
{
954955
int sv_event_no = el->el_history.eventno;
955956
el_action_t rval;
@@ -994,7 +995,7 @@ vi_to_history_line(EditLine *el, int c)
994995
*/
995996
protected el_action_t
996997
/*ARGSUSED*/
997-
vi_histedit(EditLine *el, int c)
998+
vi_histedit(EditLine *el, int c __attribute__((__unused__)))
998999
{
9991000
int fd;
10001001
pid_t pid;
@@ -1050,7 +1051,7 @@ vi_histedit(EditLine *el, int c)
10501051
*/
10511052
protected el_action_t
10521053
/*ARGSUSED*/
1053-
vi_history_word(EditLine *el, int c)
1054+
vi_history_word(EditLine *el, int c __attribute__((__unused__)))
10541055
{
10551056
const char *wp = HIST_FIRST(el);
10561057
const char *wep, *wsp;
@@ -1099,7 +1100,7 @@ vi_history_word(EditLine *el, int c)
10991100
*/
11001101
protected el_action_t
11011102
/*ARGSUSED*/
1102-
vi_redo(EditLine *el, int c)
1103+
vi_redo(EditLine *el, int c __attribute__((__unused__)))
11031104
{
11041105
c_redo_t *r = &el->el_chared.c_redo;
11051106

regex/main.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ my_regoff_t startoff = 0;
1717
my_regoff_t endoff = 0;
1818

1919

20-
extern int split();
21-
extern void regprint();
20+
extern int split(char *string, char *fields[], int nfields, char *sep);
21+
extern void regprint(my_regex_t *r, FILE *d);
2222

2323

2424
#ifdef __WIN__
@@ -192,7 +192,7 @@ FILE *in;
192192
inbuf[strlen(inbuf)-1] = '\0'; /* get rid of stupid \n */
193193
if (debug)
194194
fprintf(stdout, "%d:\n", line);
195-
nf = split(inbuf, f, MAXF, "\t\t");
195+
nf = split(inbuf, f, MAXF, (char*) "\t\t");
196196
if (nf < 3) {
197197
fprintf(stderr, "bad input, line %d\n", line);
198198
exit(1);
@@ -335,7 +335,7 @@ int opts; /* may not match f1 */
335335

336336
for (i = 1; i < NSHOULD; i++)
337337
should[i] = NULL;
338-
nshould = split(f4, should+1, NSHOULD-1, ",");
338+
nshould = split(f4, should+1, NSHOULD-1, (char*) ",");
339339
if (nshould == 0) {
340340
nshould = 1;
341341
should[1] = (char*) "";

sql/ha_ndbcluster.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -6434,8 +6434,8 @@ void ha_ndbcluster::get_auto_increment(ulonglong offset, ulonglong increment,
64346434
for (;;)
64356435
{
64366436
Ndb_tuple_id_range_guard g(m_share);
6437-
if (m_skip_auto_increment &&
6438-
ndb->readAutoIncrementValue(m_table, g.range, auto_value) ||
6437+
if ((m_skip_auto_increment &&
6438+
ndb->readAutoIncrementValue(m_table, g.range, auto_value)) ||
64396439
ndb->getAutoIncrementValue(m_table, g.range, auto_value, cache_size, increment, offset))
64406440
{
64416441
if (--retries &&
@@ -10270,8 +10270,8 @@ bool ha_ndbcluster::check_if_incompatible_data(HA_CREATE_INFO *create_info,
1027010270
{
1027110271
Field *field= table->field[i];
1027210272
const NDBCOL *col= tab->getColumn(i);
10273-
if (col->getStorageType() == NDB_STORAGETYPE_MEMORY && create_info->storage_media != HA_SM_MEMORY ||
10274-
col->getStorageType() == NDB_STORAGETYPE_DISK && create_info->storage_media != HA_SM_DISK)
10273+
if ((col->getStorageType() == NDB_STORAGETYPE_MEMORY && create_info->storage_media != HA_SM_MEMORY) ||
10274+
(col->getStorageType() == NDB_STORAGETYPE_DISK && create_info->storage_media != HA_SM_DISK))
1027510275
{
1027610276
DBUG_PRINT("info", ("Column storage media is changed"));
1027710277
DBUG_RETURN(COMPATIBLE_DATA_NO);

sql/key.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ void key_unpack(String *to,TABLE *table,uint idx)
361361
if (field->binary() && field->type() == MYSQL_TYPE_STRING && tmp.length())
362362
{
363363
const char *tmp_end= tmp.ptr() + tmp.length();
364-
while (tmp_end > tmp.ptr() && !*--tmp_end);
364+
while (tmp_end > tmp.ptr() && !*--tmp_end) ;
365365
tmp.length(tmp_end - tmp.ptr() + 1);
366366
}
367367
if (cs->mbmaxlen > 1 &&

sql/log_event.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -8503,7 +8503,7 @@ void Table_map_log_event::pack_info(Protocol *protocol)
85038503

85048504

85058505
#ifdef MYSQL_CLIENT
8506-
void Table_map_log_event::print(FILE *file, PRINT_EVENT_INFO *print_event_info)
8506+
void Table_map_log_event::print(FILE *, PRINT_EVENT_INFO *print_event_info)
85078507
{
85088508
if (!print_event_info->short_form)
85098509
{

sql/log_event.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ class Log_event
10321032
return (void*) my_malloc((uint)size, MYF(MY_WME|MY_FAE));
10331033
}
10341034

1035-
static void operator delete(void *ptr, size_t size)
1035+
static void operator delete(void *ptr, size_t)
10361036
{
10371037
my_free(ptr);
10381038
}

sql/my_decimal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ int my_decimal2int(uint mask, const my_decimal *d, my_bool unsigned_flag,
328328

329329

330330
inline
331-
int my_decimal2double(uint mask, const my_decimal *d, double *result)
331+
int my_decimal2double(uint, const my_decimal *d, double *result)
332332
{
333333
/* No need to call check_result as this will always succeed */
334334
return decimal2double((decimal_t*) d, result);

sql/sql_string.h

+7-3
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,13 @@ class String
9191
}
9292
static void *operator new(size_t size, MEM_ROOT *mem_root) throw ()
9393
{ return (void*) alloc_root(mem_root, (uint) size); }
94-
static void operator delete(void *ptr_arg,size_t size)
95-
{ TRASH(ptr_arg, size); }
96-
static void operator delete(void *ptr_arg, MEM_ROOT *mem_root)
94+
static void operator delete(void *ptr_arg, size_t size)
95+
{
96+
(void) ptr_arg;
97+
(void) size;
98+
TRASH(ptr_arg, size);
99+
}
100+
static void operator delete(void *, MEM_ROOT *)
97101
{ /* never called */ }
98102
~String() { free(); }
99103

0 commit comments

Comments
 (0)