List:Commits« Previous MessageNext Message »
From:Nirbhay Choubey Date:June 9 2012 2:12pm
Subject:bzr push into mysql-trunk branch (nirbhay.choubey:3981 to 3982) WL#5603
View as plain text  
 3982 Nirbhay Choubey	2012-06-09
      WL#5603 : Revise how we handle passwords on
                the command line
      
      Fix for the following build error :
      "suggest a space before ';' or explicit braces
       around empty body in 'for' statement"

    modified:
      mysys_ssl/my_default.cc
      mysys_ssl/my_getopt.cc
 3981 Nirbhay Choubey	2012-06-09
      WL#5603 : Revise how we handle passwords on
                the command line
      
      Addressing additional review comments.

    added:
      mysys_ssl/my_default_priv.h
    renamed:
      mysys_ssl/default.c => mysys_ssl/my_default.cc
      mysys_ssl/my_default.h => include/my_default.h
      mysys_ssl/my_getopt.c => mysys_ssl/my_getopt.cc
    modified:
      client/mysql_config_editor.cc
      extra/CMakeLists.txt
      extra/my_print_defaults.c
      libmysql/CMakeLists.txt
      libmysqld/CMakeLists.txt
      libmysqld/examples/CMakeLists.txt
      mysql-test/r/mysql_config_editor.result
      mysql-test/t/mysql_config_editor.test
      mysys/mysys_priv.h
      mysys_ssl/CMakeLists.txt
      sql/CMakeLists.txt
      storage/myisam/CMakeLists.txt
      tests/CMakeLists.txt
      mysys_ssl/my_default.cc
      include/my_default.h
=== modified file 'mysys_ssl/my_default.cc'
--- a/mysys_ssl/my_default.cc	2012-06-09 13:16:21 +0000
+++ b/mysys_ssl/my_default.cc	2012-06-09 14:11:09 +0000
@@ -1009,7 +1009,9 @@ static int search_default_file_with_ext(
 	goto err;
       }
       /* Remove end space */
-      for ( ; my_isspace(&my_charset_latin1,end[-1]) ; end--) ;
+      for ( ; my_isspace(&my_charset_latin1, end[-1]); end --)
+      {}
+
       end[0]=0;
 
       strmake(curr_gr, ptr, MY_MIN((size_t) (end-ptr)+1, sizeof(curr_gr)-1));
@@ -1031,7 +1033,9 @@ static int search_default_file_with_ext(
     end= remove_end_comment(ptr);
     if ((value= strchr(ptr, '=')))
       end= value;				/* Option without argument */
-    for ( ; my_isspace(&my_charset_latin1,end[-1]) ; end--) ;
+    for ( ; my_isspace(&my_charset_latin1, end[-1]) ; end--)
+    {}
+
     if (!value)
     {
       strmake(strmov(option,"--"),ptr, (size_t) (end-ptr));
@@ -1042,13 +1046,17 @@ static int search_default_file_with_ext(
     {
       /* Remove pre- and end space */
       char *value_end;
-      for (value++ ; my_isspace(&my_charset_latin1,*value); value++) ;
+      for (value++ ; my_isspace(&my_charset_latin1, *value); value ++)
+      {}
+
       value_end=strend(value);
       /*
 	We don't have to test for value_end >= value as we know there is
 	an '=' before
       */
-      for ( ; my_isspace(&my_charset_latin1,value_end[-1]) ; value_end--) ;
+      for ( ; my_isspace(&my_charset_latin1, value_end[-1]); value_end --)
+      {}
+
       if (value_end < value)			/* Empty string */
 	value_end=value;
 

=== modified file 'mysys_ssl/my_getopt.cc'
--- a/mysys_ssl/my_getopt.cc	2012-06-09 13:16:21 +0000
+++ b/mysys_ssl/my_getopt.cc	2012-06-09 14:11:09 +0000
@@ -1332,7 +1332,8 @@ void my_print_help(const struct my_optio
 
       while ((uint) (end - comment) > comment_space)
       {
-	for (line_end= comment + comment_space; *line_end != ' '; line_end--);
+	for (line_end= comment + comment_space; *line_end != ' '; line_end--)
+        {}
 	for (; comment != line_end; comment++)
 	  putchar(*comment);
 	comment++; /* skip the space, as a newline will take it's place now */

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (nirbhay.choubey:3981 to 3982) WL#5603Nirbhay Choubey11 Jun