Skip to content

Commit 8d7361f

Browse files
committed
Fixed cast warnings in introducing the pluggable authentication client
options.
1 parent bd708b4 commit 8d7361f

11 files changed

Lines changed: 21 additions & 21 deletions

client/mysql.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,11 +1564,11 @@ static struct my_option my_long_options[] =
15641564
&show_warnings, &show_warnings, 0, GET_BOOL, NO_ARG,
15651565
0, 0, 0, 0, 0, 0},
15661566
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
1567-
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
1567+
&opt_plugin_dir, &opt_plugin_dir, 0,
15681568
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
15691569
{"default_auth", OPT_DEFAULT_AUTH,
15701570
"Default authentication client-side plugin to use.",
1571-
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
1571+
&opt_default_auth, &opt_default_auth, 0,
15721572
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
15731573
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
15741574
};

client/mysql_upgrade.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static struct my_option my_long_options[]=
9292
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
9393
{"default_auth", OPT_DEFAULT_AUTH,
9494
"Default authentication client-side plugin to use.",
95-
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
95+
&opt_default_auth, &opt_default_auth, 0,
9696
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
9797
{"force", 'f', "Force execution of mysqlcheck even if mysql_upgrade "
9898
"has already been executed for the current version of MySQL.",
@@ -109,7 +109,7 @@ static struct my_option my_long_options[]=
109109
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
110110
#endif
111111
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
112-
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
112+
&opt_plugin_dir, &opt_plugin_dir, 0,
113113
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
114114
{"port", 'P', "Port number to use for connection or 0 for default to, in "
115115
"order of preference, my.cnf, $MYSQL_TCP_PORT, "

client/mysqladmin.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,11 @@ static struct my_option my_long_options[] =
206206
&opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG,
207207
SHUTDOWN_DEF_TIMEOUT, 0, 3600*12, 0, 1, 0},
208208
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
209-
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
209+
&opt_plugin_dir, &opt_plugin_dir, 0,
210210
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
211211
{"default_auth", OPT_DEFAULT_AUTH,
212212
"Default authentication client-side plugin to use.",
213-
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
213+
&opt_default_auth, &opt_default_auth, 0,
214214
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
215215
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
216216
};

client/mysqlbinlog.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ static struct my_option my_long_options[] =
10521052
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
10531053
{"default_auth", OPT_DEFAULT_AUTH,
10541054
"Default authentication client-side plugin to use.",
1055-
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
1055+
&opt_default_auth, &opt_default_auth, 0,
10561056
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
10571057
{"disable-log-bin", 'D', "Disable binary log. This is useful, if you "
10581058
"enabled --to-last-log and are sending the output to the same MySQL server. "
@@ -1080,7 +1080,7 @@ static struct my_option my_long_options[] =
10801080
{"password", 'p', "Password to connect to remote server.",
10811081
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
10821082
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
1083-
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
1083+
&opt_plugin_dir, &opt_plugin_dir, 0,
10841084
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
10851085
{"port", 'P', "Port number to use for connection or 0 for default to, in "
10861086
"order of preference, my.cnf, $MYSQL_TCP_PORT, "

client/mysqlcheck.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static struct my_option my_long_options[] =
102102
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
103103
{"default_auth", OPT_DEFAULT_AUTH,
104104
"Default authentication client-side plugin to use.",
105-
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
105+
&opt_default_auth, &opt_default_auth, 0,
106106
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
107107
{"fast",'F', "Check only tables that haven't been closed properly.",
108108
&opt_fast, &opt_fast, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
@@ -142,7 +142,7 @@ static struct my_option my_long_options[] =
142142
NO_ARG, 0, 0, 0, 0, 0, 0},
143143
#endif
144144
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
145-
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
145+
&opt_plugin_dir, &opt_plugin_dir, 0,
146146
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
147147
{"port", 'P', "Port number to use for connection or 0 for default to, in "
148148
"order of preference, my.cnf, $MYSQL_TCP_PORT, "

client/mysqldump.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,11 +501,11 @@ static struct my_option my_long_options[] =
501501
{"xml", 'X', "Dump a database as well formed XML.", 0, 0, 0, GET_NO_ARG,
502502
NO_ARG, 0, 0, 0, 0, 0, 0},
503503
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
504-
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
504+
&opt_plugin_dir, &opt_plugin_dir, 0,
505505
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
506506
{"default_auth", OPT_DEFAULT_AUTH,
507507
"Default authentication client-side plugin to use.",
508-
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
508+
&opt_default_auth, &opt_default_auth, 0,
509509
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
510510
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
511511
};

client/mysqlimport.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static struct my_option my_long_options[] =
9393
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
9494
{"default_auth", OPT_DEFAULT_AUTH,
9595
"Default authentication client-side plugin to use.",
96-
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
96+
&opt_default_auth, &opt_default_auth, 0,
9797
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
9898
{"delete", 'd', "First delete all rows from table.", &opt_delete,
9999
&opt_delete, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -145,7 +145,7 @@ static struct my_option my_long_options[] =
145145
NO_ARG, 0, 0, 0, 0, 0, 0},
146146
#endif
147147
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
148-
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
148+
&opt_plugin_dir, &opt_plugin_dir, 0,
149149
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
150150
{"port", 'P', "Port number to use for connection or 0 for default to, in "
151151
"order of preference, my.cnf, $MYSQL_TCP_PORT, "

client/mysqlshow.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static struct my_option my_long_options[] =
191191
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
192192
{"default_auth", OPT_DEFAULT_AUTH,
193193
"Default authentication client-side plugin to use.",
194-
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
194+
&opt_default_auth, &opt_default_auth, 0,
195195
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
196196
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG,
197197
0, 0, 0, 0, 0, 0},
@@ -207,7 +207,7 @@ static struct my_option my_long_options[] =
207207
"solicited on the tty.",
208208
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
209209
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
210-
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
210+
&opt_plugin_dir, &opt_plugin_dir, 0,
211211
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
212212
{"port", 'P', "Port number to use for connection or 0 for default to, in "
213213
"order of preference, my.cnf, $MYSQL_TCP_PORT, "

client/mysqlslap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ static struct my_option my_long_options[] =
590590
&debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
591591
{"default_auth", OPT_DEFAULT_AUTH,
592592
"Default authentication client-side plugin to use.",
593-
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
593+
&opt_default_auth, &opt_default_auth, 0,
594594
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
595595
{"delimiter", 'F',
596596
"Delimiter to use in SQL statements supplied in file or command line.",
@@ -634,7 +634,7 @@ static struct my_option my_long_options[] =
634634
NO_ARG, 0, 0, 0, 0, 0, 0},
635635
#endif
636636
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
637-
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
637+
&opt_plugin_dir, &opt_plugin_dir, 0,
638638
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
639639
{"port", 'P', "Port number to use for connection.", &opt_mysql_port,
640640
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,

client/mysqltest.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6423,7 +6423,7 @@ static struct my_option my_long_options[] =
64236423
&opt_connect_timeout, &opt_connect_timeout, 0, GET_UINT, REQUIRED_ARG,
64246424
120, 0, 3600 * 12, 0, 0, 0},
64256425
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
6426-
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
6426+
&opt_plugin_dir, &opt_plugin_dir, 0,
64276427
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
64286428
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
64296429
};

0 commit comments

Comments
 (0)