Skip to content

Commit 0a6b7ae

Browse files
Remove compiler warnings and remove not used variables
(Found during build process)
1 parent cd78e70 commit 0a6b7ae

46 files changed

Lines changed: 115 additions & 179 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

extra/comp_err.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,13 +332,13 @@ static int create_sys_files(struct languages *lang_head,
332332
head[30]= csnum;
333333

334334
my_fseek(to, 0l, MY_SEEK_SET, MYF(0));
335-
if (my_fwrite(to, head, HEADER_LENGTH, MYF(MY_WME | MY_FNABP)))
335+
if (my_fwrite(to, (byte*) head, HEADER_LENGTH, MYF(MY_WME | MY_FNABP)))
336336
goto err;
337337

338338
for (i= 0; i < row_count; i++)
339339
{
340340
int2store(head, file_pos[i]);
341-
if (my_fwrite(to, head, 2, MYF(MY_WME | MY_FNABP)))
341+
if (my_fwrite(to, (byte*) head, 2, MYF(MY_WME | MY_FNABP)))
342342
goto err;
343343
}
344344
my_fclose(to, MYF(0));

extra/perror.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ int main(int argc,char *argv[])
250250
'Unknown Error' (without regard to case).
251251
*/
252252
if (msg &&
253-
my_strnncoll(&my_charset_latin1, msg, 13, "Unknown Error", 13) &&
253+
my_strnncoll(&my_charset_latin1, (const uchar*) msg, 13,
254+
(const uchar*) "Unknown Error", 13) &&
254255
(!unknown_error || strcmp(msg, unknown_error)))
255256
{
256257
found=1;

innobase/dict/dict0dict.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2472,7 +2472,7 @@ dict_scan_id(
24722472
my_isspace(). Only after that, convert id names to UTF-8. */
24732473

24742474
b = (byte*)(*id);
2475-
id_len = strlen(b);
2475+
id_len = strlen((char*) b);
24762476

24772477
if (id_len >= 3 && b[id_len - 1] == 0xA0
24782478
&& b[id_len - 2] == 0xC2) {

innobase/dict/dict0load.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ dict_print(void)
184184

185185
if (table == NULL) {
186186
fputs("InnoDB: Failed to load table ", stderr);
187-
ut_print_namel(stderr, NULL, field, len);
187+
ut_print_namel(stderr, NULL, (char*) field, len);
188188
putc('\n', stderr);
189189
} else {
190190
/* The table definition was corrupt if there

innobase/pars/pars0sym.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ sym_tab_add_id(
220220
node->resolved = FALSE;
221221
node->indirection = NULL;
222222

223-
node->name = mem_heap_strdupl(sym_tab->heap, name, len + 1);
223+
node->name = mem_heap_strdupl(sym_tab->heap, (char*) name, len + 1);
224224
node->name_len = len;
225225

226226
UT_LIST_ADD_LAST(sym_list, sym_tab->sym_list, node);

innobase/row/row0row.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ row_build_row_ref(
430430
dfield_set_len(dfield,
431431
dtype_get_at_most_n_mbchars(
432432
dfield_get_type(dfield),
433-
clust_col_prefix_len, len, field));
433+
clust_col_prefix_len, len, (char*) field));
434434
}
435435
}
436436
}
@@ -525,7 +525,7 @@ row_build_row_ref_in_tuple(
525525
dfield_set_len(dfield,
526526
dtype_get_at_most_n_mbchars(
527527
dfield_get_type(dfield),
528-
clust_col_prefix_len, len, field));
528+
clust_col_prefix_len, len, (char*) field));
529529
}
530530
}
531531
}

innobase/row/row0sel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ row_sel_sec_rec_is_for_clust_rec(
112112
clust_len = dtype_get_at_most_n_mbchars(
113113
cur_type,
114114
ifield->prefix_len,
115-
clust_len, clust_field);
115+
clust_len, (char*) clust_field);
116116
}
117117

118118
if (0 != cmp_data_data(dict_col_get_type(col),

libmysqld/lib_sql.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ extern "C"
2828
extern unsigned long max_allowed_packet, net_buffer_length;
2929
}
3030

31-
static int fake_argc= 1;
32-
static char *fake_argv[]= {(char *)"", 0};
33-
static const char *fake_groups[] = { "server", "embedded", 0 };
34-
3531
#if defined (__WIN__)
3632
#include "../sql/mysqld.cpp"
3733
#else

myisam/mi_key.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key,
186186
FIX_LENGTH(cs, pos, length, char_length);
187187
memcpy((byte*) key, pos, char_length);
188188
if (length > char_length)
189-
cs->cset->fill(cs, key+char_length, length-char_length, ' ');
189+
cs->cset->fill(cs, (char*) key+char_length, length-char_length, ' ');
190190
key+= length;
191191
}
192192
_mi_dpointer(info,key,filepos);
@@ -296,7 +296,7 @@ uint _mi_pack_key(register MI_INFO *info, uint keynr, uchar *key, uchar *old,
296296
FIX_LENGTH(cs, pos, length, char_length);
297297
memcpy((byte*) key, pos, char_length);
298298
if (length > char_length)
299-
cs->cset->fill(cs,key+char_length, length-char_length, ' ');
299+
cs->cset->fill(cs, (char*) key+char_length, length-char_length, ' ');
300300
key+= length;
301301
k_length-=length;
302302
}

regex/engine.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ sopno stopst;
256256
register char *ssp; /* start of string matched by subsubRE */
257257
register char *sep; /* end of string matched by subsubRE */
258258
register char *oldssp; /* previous ssp */
259-
register char *dp;
259+
register char *dp; /* used in debug mode to check asserts */
260260

261261
AT("diss", start, stop, startst, stopst);
262262
sp = start;

0 commit comments

Comments
 (0)