List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:June 21 2010 2:58pm
Subject:bzr commit into mysql-next-mr-wl1054 branch (Georgi.Kodinov:2964)
View as plain text  
#At file:///Users/kgeorge/mysql/work/mysql-next-mr-wl1054/ based on revid:georgi.kodinov@stripped

 2964 Georgi Kodinov	2010-06-21
      WL1054: fixed some compilation warnings

    modified:
      plugin/auth/dialog.c
      plugin/auth/test_plugin.c
=== modified file 'plugin/auth/dialog.c'
--- a/plugin/auth/dialog.c	2010-05-31 08:39:59 +0000
+++ b/plugin/auth/dialog.c	2010-06-21 14:57:22 +0000
@@ -68,7 +68,7 @@ static int two_questions(MYSQL_PLUGIN_VI
   int pkt_len;
 
   /* send a password question */
-  if (vio->write_packet(vio, PASSWORD_QUESTION "Password, please:", 18))
+  if (vio->write_packet(vio, (const unsigned char *) PASSWORD_QUESTION "Password, please:", 18))
     return CR_ERROR;
 
   /* read the answer */
@@ -78,11 +78,11 @@ static int two_questions(MYSQL_PLUGIN_VI
   info->password_used = 1;
 
   /* fail if the password is wrong */
-  if (strcmp(pkt, info->auth_string))
+  if (strcmp((const char *)pkt, info->auth_string))
     return CR_ERROR;
 
   /* send the last, ordinary, question */
-  if (vio->write_packet(vio, LAST_QUESTION "Are you sure ?", 15))
+  if (vio->write_packet(vio, (const unsigned char *) LAST_QUESTION "Are you sure ?", 15))
     return CR_ERROR;
 
   /* read the answer */
@@ -90,7 +90,7 @@ static int two_questions(MYSQL_PLUGIN_VI
     return CR_ERROR;
 
   /* check the reply */
-  return strcmp(pkt, "yes, of course") ? CR_ERROR : CR_OK;
+  return strcmp((const char *)pkt, "yes, of course") ? CR_ERROR : CR_OK;
 }
 
 static struct st_mysql_auth two_handler=
@@ -109,7 +109,8 @@ static int three_attempts(MYSQL_PLUGIN_V
   for (i= 0; i < 3; i++)
   {
     /* send the prompt */
-    if (vio->write_packet(vio, PASSWORD_QUESTION "Password, please:", 18))
+    if (vio->write_packet(vio, 
+		(const unsigned char *) PASSWORD_QUESTION "Password, please:", 18))
       return CR_ERROR;
 
     /* read the password */
@@ -122,7 +123,7 @@ static int three_attempts(MYSQL_PLUGIN_V
       finish, if the password is correct.
       note, that we did not mark the prompt packet as "last"
     */
-    if (strcmp(pkt, info->auth_string) == 0)
+    if (strcmp((const char *) pkt, info->auth_string) == 0)
       return CR_OK;
   }
 
@@ -252,12 +253,14 @@ static int perform_dialog(MYSQL_PLUGIN_V
       if ((cmd >> 1) == 2 && *pkt == 0)
         reply= mysql->passwd;
       else
-        reply= ask(mysql, cmd >> 1, pkt, reply_buf, sizeof(reply_buf));
+        reply= ask(mysql, cmd >> 1, (const char *) pkt, 
+				   reply_buf, sizeof(reply_buf));
       if (!reply)
         return CR_ERROR;
     }
     /* send the reply to the server */
-    res= vio->write_packet(vio, reply, strlen(reply)+1);
+    res= vio->write_packet(vio, (const unsigned char *) reply, 
+						   strlen(reply)+1);
 
     if (reply != mysql->passwd && reply != reply_buf)
       free(reply);

=== modified file 'plugin/auth/test_plugin.c'
--- a/plugin/auth/test_plugin.c	2010-06-04 10:51:12 +0000
+++ b/plugin/auth/test_plugin.c	2010-06-21 14:57:22 +0000
@@ -62,7 +62,7 @@ static int auth_test_plugin(MYSQL_PLUGIN
   int pkt_len;
 
   /* send a password question */
-  if (vio->write_packet(vio, PASSWORD_QUESTION, 1))
+  if (vio->write_packet(vio, (const unsigned char *) PASSWORD_QUESTION, 1))
     return CR_ERROR;
 
   /* read the answer */
@@ -72,7 +72,7 @@ static int auth_test_plugin(MYSQL_PLUGIN
   info->password_used = 1;
 
   /* fail if the password is wrong */
-  if (strcmp(pkt, info->auth_string))
+  if (strcmp((const char *) pkt, info->auth_string))
     return CR_ERROR;
 
   /* copy auth string as a destination name to check it */
@@ -176,7 +176,7 @@ static int test_plugin_client(MYSQL_PLUG
     if (!reply)
       return CR_ERROR;
     /* send the reply to the server */
-    res= vio->write_packet(vio, reply, strlen(reply)+1);
+    res= vio->write_packet(vio, (const unsigned char *)reply, strlen(reply)+1);
 
     if (res)
       return CR_ERROR;


Attachment: [text/bzr-bundle] bzr/georgi.kodinov@oracle.com-20100621145722-d2hobgpv787loaio.bundle
Thread
bzr commit into mysql-next-mr-wl1054 branch (Georgi.Kodinov:2964) Georgi Kodinov21 Jun