summaryrefslogtreecommitdiff
path: root/tests/thread_test.c
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-07-24 09:24:44 -0300
committerDavi Arnaut <davi.arnaut@oracle.com>2010-07-24 09:24:44 -0300
commit7f80eb46e9b9d2c164737cadb9d7ce10e502054b (patch)
treed5327b252449ad234f3d139991f703ccf1ffcede /tests/thread_test.c
parentecd4a294a5d0ef4f0191993352bb0c1290e3c132 (diff)
downloadmariadb-git-7f80eb46e9b9d2c164737cadb9d7ce10e502054b.tar.gz
Bug#42733: Type-punning warnings when compiling MySQL
Post-merge fix: remove remaining casts which are now unnecessary and are actually causing warnings.
Diffstat (limited to 'tests/thread_test.c')
-rw-r--r--tests/thread_test.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/thread_test.c b/tests/thread_test.c
index 1a3dd60c1fd..c243a3a7321 100644
--- a/tests/thread_test.c
+++ b/tests/thread_test.c
@@ -88,36 +88,36 @@ static struct my_option my_long_options[] =
{
{"help", '?', "Display this help and exit", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
0, 0, 0, 0, 0},
- {"database", 'D', "Database to use", (uchar**) &database, (uchar**) &database,
+ {"database", 'D', "Database to use", &database, &database,
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"host", 'h', "Connect to host", (uchar**) &host, (uchar**) &host, 0, GET_STR,
+ {"host", 'h', "Connect to host", &host, &host, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"password", 'p',
"Password to use when connecting to server. If password is not given it's asked from the tty.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
- {"user", 'u', "User for login if not current user", (uchar**) &user,
- (uchar**) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"user", 'u', "User for login if not current user", &user,
+ &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"verbose", 'v', "Write some progress indicators", (uchar**) &verbose,
- (uchar**) &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"query", 'Q', "Query to execute in each threads", (uchar**) &query,
- (uchar**) &query, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"verbose", 'v', "Write some progress indicators", &verbose,
+ &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"query", 'Q', "Query to execute in each threads", &query,
+ &query, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"port", 'P', "Port number to use for connection or 0 for default to, in "
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
#if MYSQL_PORT_DEFAULT == 0
"/etc/services, "
#endif
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
- (uchar**) &tcp_port,
- (uchar**) &tcp_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, 0},
- {"socket", 'S', "Socket file to use for connection", (uchar**) &unix_socket,
- (uchar**) &unix_socket, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ &tcp_port,
+ &tcp_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, 0},
+ {"socket", 'S', "Socket file to use for connection", &unix_socket,
+ &unix_socket, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"test-count", 'c', "Run test count times (default %d)",
- (uchar**) &number_of_tests, (uchar**) &number_of_tests, 0, GET_UINT,
+ &number_of_tests, &number_of_tests, 0, GET_UINT,
REQUIRED_ARG, 1000, 0, 0, 0, 0, 0},
{"thread-count", 't', "Number of threads to start",
- (uchar**) &number_of_threads, (uchar**) &number_of_threads, 0, GET_UINT,
+ &number_of_threads, &number_of_threads, 0, GET_UINT,
REQUIRED_ARG, 2, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};