Commit 89af041b authored by unknown's avatar unknown

Fix warnings and error VC++ compiler


client/mysql.cc:
  Removing unreferenced variables
sql/sql_test.cc:
  Fix VC++ compiler error that doesn't permits the declaration and
  initialization of variables that can be skipped by the prior
  goto end instruction.
parent c44b5b3c
...@@ -1414,7 +1414,6 @@ static int com_server_help(String *buffer __attribute__((unused)), ...@@ -1414,7 +1414,6 @@ static int com_server_help(String *buffer __attribute__((unused)),
server_cmd= cmd_buf; server_cmd= cmd_buf;
} }
char buff[16], time_buf[32];
MYSQL_RES *result; MYSQL_RES *result;
ulong timer; ulong timer;
uint error= 0; uint error= 0;
......
...@@ -276,6 +276,7 @@ static void display_table_locks (void) ...@@ -276,6 +276,7 @@ static void display_table_locks (void)
VOID(pthread_mutex_unlock(&lock->mutex)); VOID(pthread_mutex_unlock(&lock->mutex));
} }
VOID(pthread_mutex_unlock(&THR_LOCK_lock)); VOID(pthread_mutex_unlock(&THR_LOCK_lock));
uint i;
if (!saved_table_locks.elements) goto end; if (!saved_table_locks.elements) goto end;
qsort((gptr) dynamic_element(&saved_table_locks,0,TABLE_LOCK_INFO *),saved_table_locks.elements,sizeof(TABLE_LOCK_INFO),(qsort_cmp) dl_compare); qsort((gptr) dynamic_element(&saved_table_locks,0,TABLE_LOCK_INFO *),saved_table_locks.elements,sizeof(TABLE_LOCK_INFO),(qsort_cmp) dl_compare);
...@@ -283,7 +284,7 @@ static void display_table_locks (void) ...@@ -283,7 +284,7 @@ static void display_table_locks (void)
puts("\nThread database.table_name Locked/Waiting Lock_type\n"); puts("\nThread database.table_name Locked/Waiting Lock_type\n");
for (uint i=0 ; i < saved_table_locks.elements ; i++) for (i=0 ; i < saved_table_locks.elements ; i++)
{ {
TABLE_LOCK_INFO *dl_ptr=dynamic_element(&saved_table_locks,i,TABLE_LOCK_INFO*); TABLE_LOCK_INFO *dl_ptr=dynamic_element(&saved_table_locks,i,TABLE_LOCK_INFO*);
printf("%-8ld%-28.28s%-22s%s\n", printf("%-8ld%-28.28s%-22s%s\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment