diff options
author | brian@zim.(none) <> | 2007-03-13 00:56:30 -0700 |
---|---|---|
committer | brian@zim.(none) <> | 2007-03-13 00:56:30 -0700 |
commit | 70fa527d9e6fe32bf3432a9e054860aac1f12666 (patch) | |
tree | 6a5a667529c76ab6a49faf8fe8efd002e80b082e /client/mysqlslap.c | |
parent | 8623103dfc879baa7e4f3b813ee5fb7ad8f755b0 (diff) | |
download | mariadb-git-70fa527d9e6fe32bf3432a9e054860aac1f12666.tar.gz |
Cleaning up 4 pushbuild warnings caught by Windows.
Diffstat (limited to 'client/mysqlslap.c')
-rw-r--r-- | client/mysqlslap.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/client/mysqlslap.c b/client/mysqlslap.c index 1ec8d124a48..1976c54c393 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -1037,7 +1037,7 @@ get_options(int *argc,char ***argv) if (auto_generate_sql && ((auto_generate_sql_autoincrement == FALSE) || (auto_generate_sql_guid_primary == FALSE)) && - auto_generate_sql_type == 'k') + auto_generate_sql_type[0] == 'k') { fprintf(stderr, "%s: Can't perform key test without a primary key!\n", @@ -1290,7 +1290,8 @@ generate_primary_key_list(MYSQL *mysql, statement *engine_stmt) strstr(engine_stmt->string, "blackhole"))) { primary_keys_number_of= 1; - primary_keys= (char **)my_malloc(sizeof(char *) * primary_keys_number_of, + primary_keys= (char **)my_malloc((uint)(sizeof(char *) * + primary_keys_number_of), MYF(MY_ZEROFILL|MY_FAE|MY_WME)); /* Yes, we strdup a const string to simplify the interface */ primary_keys[0]= my_strdup("796c4422-1d94-102a-9d6d-00e0812d", MYF(0)); @@ -1315,7 +1316,8 @@ generate_primary_key_list(MYSQL *mysql, statement *engine_stmt) /* We create the structure and loop and create the items. */ - primary_keys= (char **)my_malloc(sizeof(char *) * primary_keys_number_of, + primary_keys= (char **)my_malloc((uint)(sizeof(char *) * + primary_keys_number_of), MYF(MY_ZEROFILL|MY_FAE|MY_WME)); row= mysql_fetch_row(result); for (counter= 0; counter < primary_keys_number_of; @@ -1657,7 +1659,7 @@ limit_not_met: (ptr->type == SELECT_TYPE_REQUIRES_PREFIX)) { int length; - long int key_val; + unsigned int key_val; char *key; char buffer[HUGE_STRING_LENGTH]; @@ -1671,7 +1673,7 @@ limit_not_met: DBUG_ASSERT(primary_keys_number_of); if (primary_keys_number_of) { - key_val= random() % primary_keys_number_of; + key_val= (unsigned int)(random() % primary_keys_number_of); key= primary_keys[key_val]; DBUG_ASSERT(key); |