List:Commits« Previous MessageNext Message »
From:Staale Smedseng Date:June 29 2009 2:56pm
Subject:bzr commit into mysql-pe branch (staale.smedseng:3415)
View as plain text  
#At file:///export/home/tmp/ss156133/z/43414-pe/ based on revid:hall@stripped

 3415 Staale Smedseng	2009-06-29 [merge]
      Merge from 5.1

    modified:
      client/mysql.cc
      client/mysqlbinlog.cc
      cmd-line-utils/readline/bind.c
      cmd-line-utils/readline/complete.c
      cmd-line-utils/readline/display.c
      cmd-line-utils/readline/histexpand.c
      cmd-line-utils/readline/histfile.c
      cmd-line-utils/readline/history.h
      cmd-line-utils/readline/input.c
      cmd-line-utils/readline/isearch.c
      cmd-line-utils/readline/kill.c
      cmd-line-utils/readline/macro.c
      cmd-line-utils/readline/mbutil.c
      cmd-line-utils/readline/misc.c
      cmd-line-utils/readline/nls.c
      cmd-line-utils/readline/readline.h
      cmd-line-utils/readline/rlprivate.h
      cmd-line-utils/readline/rltty.c
      cmd-line-utils/readline/search.c
      cmd-line-utils/readline/terminal.c
      cmd-line-utils/readline/text.c
      cmd-line-utils/readline/tilde.c
      cmd-line-utils/readline/undo.c
      cmd-line-utils/readline/util.c
      cmd-line-utils/readline/vi_mode.c
      extra/yassl/src/handshake.cpp
      extra/yassl/src/yassl_imp.cpp
      extra/yassl/taocrypt/include/modes.hpp
      extra/yassl/taocrypt/src/asn.cpp
      sql/log_event.cc
      sql/sql_repl.cc
      sql/sql_table.cc
      sql/thr_malloc.cc
      storage/myisam/ha_myisam.cc
      strings/decimal.c
=== modified file 'client/mysql.cc'
--- a/client/mysql.cc	2009-06-19 09:28:44 +0000
+++ b/client/mysql.cc	2009-06-29 14:56:06 +0000
@@ -2040,7 +2040,7 @@ static COMMANDS *find_command(char *name
 				     (uchar*)commands[i].name,len) &&
 	  !commands[i].name[len] &&
 	  (!end || (end && commands[i].takes_params))) ||
-	 !name && commands[i].cmd_char == cmd_char))
+	 (!name && commands[i].cmd_char == cmd_char)))
     {
       DBUG_PRINT("exit",("found command: %s", commands[i].name));
       DBUG_RETURN(&commands[i]);
@@ -2199,7 +2199,7 @@ static bool add_line(String &buffer,char
       buffer.length(0);
     }
     else if (!*ml_comment && (!*in_string && (inchar == '#' ||
-			      inchar == '-' && pos[1] == '-' &&
+                                              (inchar == '-' && pos[1] == '-' &&
                               /*
                                 The third byte is either whitespace or is the
                                 end of the line -- which would occur only
@@ -2207,7 +2207,7 @@ static bool add_line(String &buffer,char
                                 itself whitespace and should also match.
                               */
 			      (my_isspace(charset_info,pos[2]) ||
-                               !pos[2]))))
+                               !pos[2])))))
     {
       // Flush previously accepted characters
       if (out != line)

=== modified file 'client/mysqlbinlog.cc'
--- a/client/mysqlbinlog.cc	2009-05-15 13:38:06 +0000
+++ b/client/mysqlbinlog.cc	2009-06-29 14:56:06 +0000
@@ -696,8 +696,8 @@ Exit_status process_event(PRINT_EVENT_IN
     Format events are not concerned by --offset and such, we always need to
     read them to be able to process the wanted events.
   */
-  if ((rec_count >= offset) &&
-      ((my_time_t)(ev->when) >= start_datetime) ||
+  if (((rec_count >= offset) &&
+       ((my_time_t)(ev->when) >= start_datetime)) ||
       (ev_type == FORMAT_DESCRIPTION_EVENT))
   {
     if (ev_type != FORMAT_DESCRIPTION_EVENT)

=== modified file 'cmd-line-utils/readline/bind.c'
--- a/cmd-line-utils/readline/bind.c	2009-06-06 15:35:01 +0000
+++ b/cmd-line-utils/readline/bind.c	2009-06-29 14:56:06 +0000
@@ -79,7 +79,7 @@ static int _rl_read_init_file PARAMS((co
 static int glean_key_from_name PARAMS((char *));
 static int find_boolean_var PARAMS((const char *));
 
-static char *_rl_get_string_variable_value PARAMS((const char *));
+static const char *_rl_get_string_variable_value PARAMS((const char *));
 static int substring_member_of_array PARAMS((char *, const char **));
 
 static int currently_reading_init_file;
@@ -442,7 +442,7 @@ rl_translate_keyseq (seq, array, len)
 {
   register int i, c, l, temp;
 
-  for (i = l = 0; c = seq[i]; i++)
+  for (i = l = 0; (c = seq[i]); i++)
     {
       if (c == '\\')
 	{
@@ -776,7 +776,8 @@ _rl_read_file (filename, sizep)
   file_size = (size_t)finfo.st_size;
 
   /* check for overflow on very large files */
-  if (file_size != finfo.st_size || file_size + 1 < file_size)
+if ((sizeof(off_t) > sizeof(size_t) && finfo.st_size > (off_t)(size_t)~0) ||  
+    file_size + 1 < file_size)
     {
       if (file >= 0)
 	close (file);
@@ -807,7 +808,7 @@ _rl_read_file (filename, sizep)
 /* Re-read the current keybindings file. */
 int
 rl_re_read_init_file (count, ignore)
-     int count, ignore;
+     int count __attribute__((unused)), ignore __attribute__((unused));
 {
   int r;
   r = rl_read_init_file ((const char *)NULL);
@@ -1031,7 +1032,7 @@ parser_if (args)
 /* Invert the current parser state if there is anything on the stack. */
 static int
 parser_else (args)
-     char *args;
+     char *args __attribute__((unused));
 {
   register int i;
 
@@ -1062,7 +1063,7 @@ parser_else (args)
    _rl_parsing_conditionalized_out from the stack. */
 static int
 parser_endif (args)
-     char *args;
+     char *args __attribute__((unused));
 {
   if (if_stack_depth)
     _rl_parsing_conditionalized_out = if_stack[--if_stack_depth];
@@ -1185,7 +1186,7 @@ rl_parse_and_bind (string)
     {
       int passc = 0;
 
-      for (i = 1; c = string[i]; i++)
+      for (i = 1; (c = string[i]); i++)
 	{
 	  if (passc)
 	    {
@@ -1276,7 +1277,7 @@ rl_parse_and_bind (string)
       int delimiter, passc;
 
       delimiter = string[i++];
-      for (passc = 0; c = string[i]; i++)
+      for (passc = 0; (c = string[i]); i++)
 	{
 	  if (passc)
 	    {
@@ -1436,7 +1437,7 @@ static struct {
 #if defined (VISIBLE_STATS)
   { "visible-stats",		&rl_visible_stats,		0 },
 #endif /* VISIBLE_STATS */
-  { (char *)NULL, (int *)NULL }
+  { (char *)NULL, (int *)NULL, 0 }
 };
 
 static int
@@ -1505,7 +1506,7 @@ static struct {
   { "editing-mode",	V_STRING,	sv_editmode },
   { "isearch-terminators", V_STRING,	sv_isrchterm },
   { "keymap",		V_STRING,	sv_keymap },
-  { (char *)NULL,	0 }
+  { (char *)NULL,	0,              (_rl_sv_func_t*)NULL }
 };
 
 static int
@@ -1532,7 +1533,7 @@ bool_to_int (value)
 		(value[0] == '1' && value[1] == '\0'));
 }
 
-char *
+const char *
 rl_variable_value (name)
      const char *name;
 {
@@ -1799,7 +1800,7 @@ rl_set_keymap_from_edit_mode ()
 #endif /* VI_MODE */
 }
 
-char *
+const char *
 rl_get_keymap_name_from_edit_mode ()
 {
   if (rl_editing_mode == emacs_mode)
@@ -2048,7 +2049,7 @@ rl_function_dumper (print_readably)
 
   fprintf (rl_outstream, "\n");
 
-  for (i = 0; name = names[i]; i++)
+  for (i = 0; (name = names[i]); i++)
     {
       rl_command_func_t *function;
       char **invokers;
@@ -2108,7 +2109,7 @@ rl_function_dumper (print_readably)
    the output in such a way that it can be read back in. */
 int
 rl_dump_functions (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   if (rl_dispatching)
     fprintf (rl_outstream, "\r\n");
@@ -2188,7 +2189,7 @@ rl_macro_dumper (print_readably)
 
 int
 rl_dump_macros (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   if (rl_dispatching)
     fprintf (rl_outstream, "\r\n");
@@ -2197,12 +2198,13 @@ rl_dump_macros (count, key)
   return (0);
 }
 
-static char *
+static const char *
 _rl_get_string_variable_value (name)
      const char *name;
 {
   static char numbuf[32];
-  char *ret;
+  const char *ret;
+  char *tmp;
 
   if (_rl_stricmp (name, "bell-style") == 0)
     {
@@ -2230,11 +2232,11 @@ _rl_get_string_variable_value (name)
     {
       if (_rl_isearch_terminators == 0)
 	return 0;
-      ret = _rl_untranslate_macro_value (_rl_isearch_terminators);
-      if (ret)
+      tmp = _rl_untranslate_macro_value (_rl_isearch_terminators);
+      if (tmp)
 	{
-	  strncpy (numbuf, ret, sizeof (numbuf) - 1);
-	  free (ret);
+	  strncpy (numbuf, tmp, sizeof (numbuf) - 1);
+	  free (tmp);
 	  numbuf[sizeof(numbuf) - 1] = '\0';
 	}
       else
@@ -2257,7 +2259,7 @@ rl_variable_dumper (print_readably)
      int print_readably;
 {
   int i;
-  char *v;
+  const char *v;
 
   for (i = 0; boolean_varlist[i].name; i++)
     {
@@ -2286,7 +2288,7 @@ rl_variable_dumper (print_readably)
    the output in such a way that it can be read back in. */
 int
 rl_dump_variables (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   if (rl_dispatching)
     fprintf (rl_outstream, "\r\n");

=== modified file 'cmd-line-utils/readline/complete.c'
--- a/cmd-line-utils/readline/complete.c	2008-01-23 16:43:46 +0000
+++ b/cmd-line-utils/readline/complete.c	2009-06-29 14:00:47 +0000
@@ -359,14 +359,14 @@ rl_complete (ignore, invoking_key)
 /* List the possible completions.  See description of rl_complete (). */
 int
 rl_possible_completions (ignore, invoking_key)
-     int ignore, invoking_key;
+     int ignore __attribute__((unused)), invoking_key __attribute__((unused));
 {
   return (rl_complete_internal ('?'));
 }
 
 int
 rl_insert_completions (ignore, invoking_key)
-     int ignore, invoking_key;
+     int ignore __attribute__((unused)), invoking_key __attribute__((unused));
 {
   return (rl_complete_internal ('*'));
 }
@@ -696,7 +696,8 @@ print_filename (to_print, full_pathname)
      char *to_print, *full_pathname;
 {
   int printed_len, extension_char, slen, tlen;
-  char *s, c, *new_full_pathname, *dn;
+  char *s, c, *new_full_pathname;
+  const char *dn;
 
   extension_char = 0;
   printed_len = fnprint (to_print);
@@ -783,7 +784,7 @@ print_filename (to_print, full_pathname)
 static char *
 rl_quote_filename (s, rtype, qcp)
      char *s;
-     int rtype;
+     int rtype __attribute__((unused));
      char *qcp;
 {
   char *r;
@@ -884,7 +885,7 @@ _rl_find_completion_word (fp, dp)
       /* We didn't find an unclosed quoted substring upon which to do
          completion, so use the word break characters to find the
          substring on which to complete. */
-      while (rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY))
+      while ((rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY)))
 	{
 	  scan = rl_line_buffer[rl_point];
 
@@ -1803,7 +1804,7 @@ rl_completion_matches (text, entry_funct
   match_list = (char **)xmalloc ((match_list_size + 1) * sizeof (char *));
   match_list[1] = (char *)NULL;
 
-  while (string = (*entry_function) (text, matches))
+  while ((string = (*entry_function) (text, matches)))
     {
       if (matches + 1 == match_list_size)
 	match_list = (char **)xrealloc
@@ -2111,7 +2112,7 @@ rl_filename_completion_function (text, s
    ring the bell, and reset the counter to zero. */
 int
 rl_menu_complete (count, ignore)
-     int count, ignore;
+     int count, ignore __attribute__((unused));
 {
   rl_compentry_func_t *our_func;
   int matching_filenames, found_quote;

=== modified file 'cmd-line-utils/readline/display.c'
--- a/cmd-line-utils/readline/display.c	2009-06-06 15:35:01 +0000
+++ b/cmd-line-utils/readline/display.c	2009-06-29 14:56:06 +0000
@@ -127,7 +127,7 @@ int _rl_want_redisplay = 0;
 
 /* The stuff that gets printed out before the actual text of the line.
    This is usually pointing to rl_prompt. */
-char *rl_display_prompt = (char *)NULL;
+const char *rl_display_prompt = (const char *)NULL;
 
 /* Pseudo-global variables declared here. */
 
@@ -227,7 +227,10 @@ expand_prompt (pmt, lp, lip, niflp, vlp)
      int *lp, *lip, *niflp, *vlp;
 {
   char *r, *ret, *p, *igstart;
-  int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars;
+  int l, rl, last, ignoring, ninvis, invfl, invflset, physchars;
+#if defined (HANDLE_MULTIBYTE)
+  int ind, pind;
+#endif
 
   /* Short-circuit if we can. */
   if ((MB_CUR_MAX <= 1 || rl_byte_oriented) && strchr (pmt, RL_PROMPT_START_IGNORE) == 0)
@@ -240,7 +243,7 @@ expand_prompt (pmt, lp, lip, niflp, vlp)
       if (niflp)
 	*niflp = 0;
       if (vlp)
-	*vlp = lp ? *lp : strlen (r);
+	*vlp = lp ? *lp : (int)strlen (r);
       return r;
     }
 
@@ -457,9 +460,10 @@ rl_redisplay ()
   register int in, out, c, linenum, cursor_linenum;
   register char *line;
   int inv_botlin, lb_linenum, o_cpos;
-  int newlines, lpos, temp, modmark, n0, num;
-  char *prompt_this_line;
+  int newlines, lpos, temp, modmark;
+  const char *prompt_this_line;
 #if defined (HANDLE_MULTIBYTE)
+  int num, n0;
   wchar_t wc;
   size_t wc_bytes;
   int wc_width;
@@ -624,7 +628,6 @@ rl_redisplay ()
      contents of the command line? */
   while (lpos >= _rl_screenwidth)
     {
-      int z;
       /* fix from Darin Johnson <darin@stripped> for prompt string with
          invisible characters that is longer than the screen width.  The
          prompt_invis_chars_first_line variable could be made into an array
@@ -633,6 +636,7 @@ rl_redisplay ()
          prompts that exceed two physical lines?
          Additional logic fix from Edward Catmur <ed@stripped> */
 #if defined (HANDLE_MULTIBYTE)
+      int z;
       if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
 	{
 	  n0 = num;
@@ -874,6 +878,7 @@ rl_redisplay ()
   if (_rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up)
     {
       int nleft, pos, changed_screen_line, tx;
+      char empty_str[1] = { 0 };
 
       if (!rl_display_fixed || forced_display)
 	{
@@ -898,7 +903,7 @@ rl_redisplay ()
 #define VIS_LLEN(l)	((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l]))
 #define INV_LLEN(l)	(inv_lbreaks[l+1] - inv_lbreaks[l])
 #define VIS_CHARS(line) (visible_line + vis_lbreaks[line])
-#define VIS_LINE(line) ((line) > _rl_vis_botlin) ? "" : VIS_CHARS(line)
+#define VIS_LINE(line) ((line) > _rl_vis_botlin) ? empty_str : VIS_CHARS(line)
 #define INV_LINE(line) (invisible_line + inv_lbreaks[line])
 
 	  /* For each line in the buffer, do the updating display. */
@@ -965,7 +970,7 @@ rl_redisplay ()
 		  _rl_move_vert (linenum);
 		  _rl_move_cursor_relative (0, tt);
 		  _rl_clear_to_eol
-		    ((linenum == _rl_vis_botlin) ? strlen (tt) : _rl_screenwidth);
+		    ((linenum == _rl_vis_botlin) ? (int)strlen (tt) : _rl_screenwidth);
 		}
 	    }
 	  _rl_vis_botlin = inv_botlin;
@@ -2257,7 +2262,7 @@ static void
 redraw_prompt (t)
      char *t;
 {
-  char *oldp;
+  const char *oldp;
 
   oldp = rl_display_prompt;
   rl_save_prompt ();

=== modified file 'cmd-line-utils/readline/histexpand.c'
--- a/cmd-line-utils/readline/histexpand.c	2008-04-28 16:24:05 +0000
+++ b/cmd-line-utils/readline/histexpand.c	2009-06-29 14:56:06 +0000
@@ -87,14 +87,14 @@ char history_comment_char = '\0';
 
 /* The list of characters which inhibit the expansion of text if found
    immediately following history_expansion_char. */
-char *history_no_expand_chars = " \t\n\r=";
+const char *history_no_expand_chars = " \t\n\r=";
 
 /* If set to a non-zero value, single quotes inhibit history expansion.
    The default is 0. */
 int history_quotes_inhibit_expansion = 0;
 
 /* Used to split words by history_tokenize_internal. */
-char *history_word_delimiters = HISTORY_WORD_DELIMITERS;
+const char *history_word_delimiters = HISTORY_WORD_DELIMITERS;
 
 /* If set, this points to a function that is called to verify that a
    particular history expansion should be performed. */
@@ -203,7 +203,7 @@ get_history_event (string, caller_index,
     }
 
   /* Only a closing `?' or a newline delimit a substring search string. */
-  for (local_index = i; c = string[i]; i++)
+  for (local_index = i; (c = string[i]); i++)
     {
 #if defined (HANDLE_MULTIBYTE)
       if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)

=== modified file 'cmd-line-utils/readline/histfile.c'
--- a/cmd-line-utils/readline/histfile.c	2008-01-23 16:43:46 +0000
+++ b/cmd-line-utils/readline/histfile.c	2009-06-29 14:00:47 +0000
@@ -186,7 +186,8 @@ read_history_range (filename, from, to)
   file_size = (size_t)finfo.st_size;
 
   /* check for overflow on very large files */
-  if (file_size != finfo.st_size || file_size + 1 < file_size)
+if ((sizeof(off_t) > sizeof(size_t) && finfo.st_size > (off_t)(size_t)~0) ||  
+    file_size + 1 < file_size)
     {
       errno = overflow_errno;
       goto error_and_exit;
@@ -339,7 +340,8 @@ history_truncate_file (fname, lines)
   file_size = (size_t)finfo.st_size;
 
   /* check for overflow on very large files */
-  if (file_size != finfo.st_size || file_size + 1 < file_size)
+if ((sizeof(off_t) > sizeof(size_t) && finfo.st_size > (off_t)(size_t)~0) ||  
+    file_size + 1 < file_size)
     {
       close (file);
 #if defined (EFBIG)

=== modified file 'cmd-line-utils/readline/history.h'
--- a/cmd-line-utils/readline/history.h	2005-07-19 00:22:38 +0000
+++ b/cmd-line-utils/readline/history.h	2009-06-29 13:17:01 +0000
@@ -243,9 +243,9 @@ extern int history_length;
 extern int history_max_entries;
 extern char history_expansion_char;
 extern char history_subst_char;
-extern char *history_word_delimiters;
+extern const char *history_word_delimiters;
 extern char history_comment_char;
-extern char *history_no_expand_chars;
+extern const char *history_no_expand_chars;
 extern char *history_search_delimiter_chars;
 extern int history_quotes_inhibit_expansion;
 

=== modified file 'cmd-line-utils/readline/input.c'
--- a/cmd-line-utils/readline/input.c	2008-01-03 13:26:41 +0000
+++ b/cmd-line-utils/readline/input.c	2009-06-29 13:17:01 +0000
@@ -420,7 +420,7 @@ rl_read_key ()
   else
     {
       /* If input is coming from a macro, then use that. */
-      if (c = _rl_next_macro_key ())
+      if ((c = _rl_next_macro_key ()))
 	return (c);
 
       /* If the user has an event function, then call it periodically. */

=== modified file 'cmd-line-utils/readline/isearch.c'
--- a/cmd-line-utils/readline/isearch.c	2008-01-03 13:26:41 +0000
+++ b/cmd-line-utils/readline/isearch.c	2009-06-29 13:17:01 +0000
@@ -75,7 +75,7 @@ static int _rl_isearch_cleanup PARAMS((_
 static char *last_isearch_string;
 static int last_isearch_string_len;
 
-static char *default_isearch_terminators = "\033\012";
+static const char *default_isearch_terminators = "\033\012";
 
 _rl_search_cxt *
 _rl_scxt_alloc (type, flags)
@@ -119,7 +119,7 @@ _rl_scxt_alloc (type, flags)
 void
 _rl_scxt_dispose (cxt, flags)
      _rl_search_cxt *cxt;
-     int flags;
+     int flags __attribute__((unused));
 {
   FREE (cxt->search_string);
   FREE (cxt->allocated_line);
@@ -154,7 +154,7 @@ rl_forward_search_history (sign, key)
 static void
 rl_display_search (search_string, reverse_p, where)
      char *search_string;
-     int reverse_p, where;
+     int reverse_p, where __attribute__((unused));
 {
   char *message;
   int msglen, searchlen;
@@ -614,7 +614,7 @@ _rl_isearch_cleanup (cxt, r)
    backwards. */
 static int
 rl_search_history (direction, invoking_key)
-     int direction, invoking_key;
+     int direction, invoking_key __attribute__((unused));
 {
   _rl_search_cxt *cxt;		/* local for now, but saved globally */
   int c, r;

=== modified file 'cmd-line-utils/readline/kill.c'
--- a/cmd-line-utils/readline/kill.c	2008-01-03 13:26:41 +0000
+++ b/cmd-line-utils/readline/kill.c	2009-06-29 13:17:01 +0000
@@ -79,7 +79,7 @@ static int rl_yank_nth_arg_internal PARA
    of kill material. */
 int
 rl_set_retained_kills (num)
-     int num;
+     int num __attribute__((unused));
 {
   return 0;
 }
@@ -296,7 +296,7 @@ rl_backward_kill_line (direction, ignore
 /* Kill the whole line, no matter where point is. */
 int
 rl_kill_full_line (count, ignore)
-     int count, ignore;
+     int count __attribute__((unused)), ignore __attribute__((unused));
 {
   rl_begin_undo_group ();
   rl_point = 0;
@@ -314,7 +314,7 @@ rl_kill_full_line (count, ignore)
    using behaviour that they expect. */
 int
 rl_unix_word_rubout (count, key)
-     int count, key;
+     int count, key __attribute__((unused));
 {
   int orig_point;
 
@@ -347,7 +347,7 @@ rl_unix_word_rubout (count, key)
    deletes backward to directory separator (`/') or whitespace.  */
 int
 rl_unix_filename_rubout (count, key)
-     int count, key;
+     int count, key __attribute__((unused));
 {
   int orig_point, c;
 
@@ -391,7 +391,7 @@ rl_unix_filename_rubout (count, key)
    doing. */
 int
 rl_unix_line_discard (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   if (rl_point == 0)
     rl_ding ();
@@ -428,7 +428,7 @@ region_kill_internal (delete)
 /* Copy the text in the region to the kill ring. */
 int
 rl_copy_region_to_kill (count, ignore)
-     int count, ignore;
+     int count __attribute__((unused)), ignore __attribute__((unused));
 {
   return (region_kill_internal (0));
 }
@@ -436,7 +436,7 @@ rl_copy_region_to_kill (count, ignore)
 /* Kill the text between the point and mark. */
 int
 rl_kill_region (count, ignore)
-     int count, ignore;
+     int count __attribute__((unused)), ignore __attribute__((unused));
 {
   int r, npoint;
 
@@ -501,7 +501,7 @@ rl_copy_backward_word (count, key)
 /* Yank back the last killed text.  This ignores arguments. */
 int
 rl_yank (count, ignore)
-     int count, ignore;
+     int count __attribute__((unused)), ignore __attribute__((unused));
 {
   if (rl_kill_ring == 0)
     {
@@ -520,7 +520,7 @@ rl_yank (count, ignore)
    yank back some other text. */
 int
 rl_yank_pop (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   int l, n;
 

=== modified file 'cmd-line-utils/readline/macro.c'
--- a/cmd-line-utils/readline/macro.c	2008-01-03 13:26:41 +0000
+++ b/cmd-line-utils/readline/macro.c	2009-06-29 13:17:01 +0000
@@ -201,7 +201,7 @@ _rl_kill_kbd_macro ()
    re-executing the existing macro. */
 int
 rl_start_kbd_macro (ignore1, ignore2)
-     int ignore1, ignore2;
+     int ignore1 __attribute__((unused)), ignore2 __attribute__((unused));
 {
   if (RL_ISSTATE (RL_STATE_MACRODEF))
     {
@@ -226,7 +226,7 @@ rl_start_kbd_macro (ignore1, ignore2)
    that many times, counting the definition as the first time. */
 int
 rl_end_kbd_macro (count, ignore)
-     int count, ignore;
+     int count, ignore __attribute__((unused));
 {
   if (RL_ISSTATE (RL_STATE_MACRODEF) == 0)
     {
@@ -246,7 +246,7 @@ rl_end_kbd_macro (count, ignore)
    COUNT says how many times to execute it. */
 int
 rl_call_last_kbd_macro (count, ignore)
-     int count, ignore;
+     int count, ignore __attribute__((unused));
 {
   if (current_macro == 0)
     _rl_abort_internal ();

=== modified file 'cmd-line-utils/readline/mbutil.c'
--- a/cmd-line-utils/readline/mbutil.c	2008-01-03 13:26:41 +0000
+++ b/cmd-line-utils/readline/mbutil.c	2009-06-29 13:17:01 +0000
@@ -346,8 +346,8 @@ _rl_char_value (buf, ind)
 #undef _rl_find_next_mbchar
 int
 _rl_find_next_mbchar (string, seed, count, flags)
-     char *string;
-     int seed, count, flags;
+     char *string __attribute__((unused));
+     int seed, count, flags __attribute__((unused));
 {
 #if defined (HANDLE_MULTIBYTE)
   return _rl_find_next_mbchar_internal (string, seed, count, flags);
@@ -362,8 +362,8 @@ _rl_find_next_mbchar (string, seed, coun
 #undef _rl_find_prev_mbchar
 int
 _rl_find_prev_mbchar (string, seed, flags)
-     char *string;
-     int seed, flags;
+     char *string __attribute__((unused));
+     int seed, flags __attribute__((unused));
 {
 #if defined (HANDLE_MULTIBYTE)
   return _rl_find_prev_mbchar_internal (string, seed, flags);

=== modified file 'cmd-line-utils/readline/misc.c'
--- a/cmd-line-utils/readline/misc.c	2008-01-03 13:26:41 +0000
+++ b/cmd-line-utils/readline/misc.c	2009-06-29 13:17:01 +0000
@@ -228,7 +228,7 @@ _rl_reset_argument ()
 /* Start a numeric argument with initial value KEY */
 int
 rl_digit_argument (ignore, key)
-     int ignore, key;
+     int ignore __attribute__((unused)), key;
 {
   _rl_arg_init ();
   if (RL_ISSTATE (RL_STATE_CALLBACK))
@@ -249,7 +249,7 @@ rl_digit_argument (ignore, key)
    dispatch on it.  If the key is the abort character then abort. */
 int
 rl_universal_argument (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   _rl_arg_init ();
   rl_numeric_arg *= 4;
@@ -413,7 +413,7 @@ _rl_history_set_point ()
 void
 rl_replace_from_history (entry, flags)
      HIST_ENTRY *entry;
-     int flags;			/* currently unused */
+     int flags __attribute__((unused));	/* currently unused */
 {
   /* Can't call with `1' because rl_undo_list might point to an undo list
      from a history entry, just like we're setting up here. */
@@ -440,7 +440,7 @@ rl_replace_from_history (entry, flags)
 /* Meta-< goes to the start of the history. */
 int
 rl_beginning_of_history (count, key)
-     int count, key;
+     int count __attribute__((unused)), key;
 {
   return (rl_get_previous_history (1 + where_history (), key));
 }
@@ -448,7 +448,7 @@ rl_beginning_of_history (count, key)
 /* Meta-> goes to the end of the history.  (The current line). */
 int
 rl_end_of_history (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   rl_maybe_replace_line ();
   using_history ();
@@ -553,7 +553,7 @@ rl_get_previous_history (count, key)
 /* How to toggle back and forth between editing modes. */
 int
 rl_vi_editing_mode (count, key)
-     int count, key;
+     int count __attribute__((unused)), key;
 {
 #if defined (VI_MODE)
   _rl_set_insert_mode (RL_IM_INSERT, 1);	/* vi mode ignores insert mode */
@@ -566,7 +566,7 @@ rl_vi_editing_mode (count, key)
 
 int
 rl_emacs_editing_mode (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   rl_editing_mode = emacs_mode;
   _rl_set_insert_mode (RL_IM_INSERT, 1); /* emacs mode default is insert mode */
@@ -577,7 +577,7 @@ rl_emacs_editing_mode (count, key)
 /* Function for the rest of the library to use to set insert/overwrite mode. */
 void
 _rl_set_insert_mode (im, force)
-     int im, force;
+     int im, force __attribute__((unused));
 {
 #ifdef CURSOR_MODE
   _rl_set_cursor (im, force);
@@ -590,7 +590,7 @@ _rl_set_insert_mode (im, force)
    mode.  A negative or zero explicit argument selects insert mode. */
 int
 rl_overwrite_mode (count, key)
-     int count, key;
+     int count, key __attribute__((unused));
 {
   if (rl_explicit_arg == 0)
     _rl_set_insert_mode (rl_insert_mode ^ 1, 0);

=== modified file 'cmd-line-utils/readline/nls.c'
--- a/cmd-line-utils/readline/nls.c	2008-01-03 13:26:41 +0000
+++ b/cmd-line-utils/readline/nls.c	2009-06-29 13:17:01 +0000
@@ -101,7 +101,8 @@ _rl_init_eightbit ()
 /* If we have setlocale(3), just check the current LC_CTYPE category
    value, and go into eight-bit mode if it's not C or POSIX. */
 #if defined (HAVE_SETLOCALE)
-  char *lspec, *t;
+  const char *lspec;
+  char *t;
 
   /* Set the LC_CTYPE locale category from environment variables. */
   lspec = _rl_get_locale_var ("LC_CTYPE");
@@ -127,7 +128,8 @@ _rl_init_eightbit ()
     return (0);
 
 #else /* !HAVE_SETLOCALE */
-  char *lspec, *t;
+  const char *lspec;
+  char *t;
   int i;
 
   /* We don't have setlocale.  Finesse it.  Check the environment for the

=== modified file 'cmd-line-utils/readline/readline.h'
--- a/cmd-line-utils/readline/readline.h	2007-11-19 13:38:08 +0000
+++ b/cmd-line-utils/readline/readline.h	2009-06-29 13:17:01 +0000
@@ -304,7 +304,7 @@ extern int rl_bind_keyseq_if_unbound PAR
 extern int rl_bind_keyseq_if_unbound_in_map PARAMS((const char *, rl_command_func_t *, Keymap));
 extern int rl_generic_bind PARAMS((int, const char *, char *, Keymap));
 
-extern char *rl_variable_value PARAMS((const char *));
+extern const char *rl_variable_value PARAMS((const char *));
 extern int rl_variable_bind PARAMS((const char *, const char *));
 
 /* Backwards compatibility, use rl_bind_keyseq_in_map instead. */
@@ -343,7 +343,7 @@ extern void rl_set_keymap PARAMS((Keymap
 extern Keymap rl_get_keymap PARAMS((void));
 /* Undocumented; used internally only. */
 extern void rl_set_keymap_from_edit_mode PARAMS((void));
-extern char *rl_get_keymap_name_from_edit_mode PARAMS((void));
+extern const char *rl_get_keymap_name_from_edit_mode PARAMS((void));
 
 /* Functions for manipulating the funmap, which maps command names to functions. */
 extern int rl_add_funmap_entry PARAMS((const char *, rl_command_func_t *));
@@ -406,7 +406,7 @@ extern void rl_set_screen_size PARAMS((i
 extern void rl_get_screen_size PARAMS((int *, int *));
 extern void rl_reset_screen_size PARAMS((void));
 
-extern char *rl_get_termcap PARAMS((const char *));
+extern const char *rl_get_termcap PARAMS((const char *));
 
 /* Functions for character input. */
 extern int rl_stuff_char PARAMS((int));

=== modified file 'cmd-line-utils/readline/rlprivate.h'
--- a/cmd-line-utils/readline/rlprivate.h	2007-11-19 13:38:08 +0000
+++ b/cmd-line-utils/readline/rlprivate.h	2009-06-29 13:17:01 +0000
@@ -77,7 +77,7 @@ typedef struct  __rl_search_context
   int sline_len;
   int sline_index;
 
-  char  *search_terminators;
+  const char  *search_terminators;
 } _rl_search_cxt;
 
 /* Callback data for reading numeric arguments */
@@ -164,7 +164,7 @@ extern int rl_set_retained_kills PARAMS(
 extern void _rl_set_screen_size PARAMS((int, int));
 
 /* undo.c */
-extern int _rl_fix_last_undo_of_type PARAMS((int, int, int));
+extern int _rl_fix_last_undo_of_type PARAMS((enum undo_code, int, int));
 
 /* util.c */
 extern char *_rl_savestring PARAMS((const char *));
@@ -359,7 +359,7 @@ extern int _rl_vis_botlin;
 extern int _rl_last_c_pos;
 extern int _rl_suppress_redisplay;
 extern int _rl_want_redisplay;
-extern char *rl_display_prompt;
+extern const char *rl_display_prompt;
 
 /* isearch.c */
 extern char *_rl_isearch_terminators;
@@ -398,17 +398,17 @@ extern _rl_search_cxt *_rl_nscxt;
 /* terminal.c */
 extern int _rl_enable_keypad;
 extern int _rl_enable_meta;
-extern char *_rl_term_clreol;
-extern char *_rl_term_clrpag;
-extern char *_rl_term_im;
-extern char *_rl_term_ic;
-extern char *_rl_term_ei;
-extern char *_rl_term_DC;
-extern char *_rl_term_up;
-extern char *_rl_term_dc;
-extern char *_rl_term_cr;
-extern char *_rl_term_IC;
-extern char *_rl_term_forward_char;
+extern const char *_rl_term_clreol;
+extern const char *_rl_term_clrpag;
+extern const char *_rl_term_im;
+extern const char *_rl_term_ic;
+extern const char *_rl_term_ei;
+extern const char *_rl_term_DC;
+extern const char *_rl_term_up;
+extern const char *_rl_term_dc;
+extern const char *_rl_term_cr;
+extern const char *_rl_term_IC;
+extern const char *_rl_term_forward_char;
 extern int _rl_screenheight;
 extern int _rl_screenwidth;
 extern int _rl_screenchars;

=== modified file 'cmd-line-utils/readline/rltty.c'
--- a/cmd-line-utils/readline/rltty.c	2008-01-23 16:43:46 +0000
+++ b/cmd-line-utils/readline/rltty.c	2009-06-29 14:00:47 +0000
@@ -764,7 +764,7 @@ rl_deprep_terminal ()
 
 int
 rl_restart_output (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
 #if defined (__MINGW32__)
   return 0;
@@ -802,7 +802,7 @@ rl_restart_output (count, key)
 
 int
 rl_stop_output (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
 #if defined (__MINGW32__)
   return 0;

=== modified file 'cmd-line-utils/readline/search.c'
--- a/cmd-line-utils/readline/search.c	2008-01-03 13:26:41 +0000
+++ b/cmd-line-utils/readline/search.c	2009-06-29 13:17:01 +0000
@@ -211,7 +211,7 @@ _rl_nsearch_init (dir, pchar)
   rl_end = rl_point = 0;
 
   p = _rl_make_prompt_for_search (pchar ? pchar : ':');
-  rl_message ("%s", p, 0);
+  rl_message ("%s", p);
   free (p);
 
   RL_SETSTATE(RL_STATE_NSEARCH);
@@ -383,7 +383,7 @@ noninc_search (dir, pchar)
    code calls this, KEY will be `?'. */
 int
 rl_noninc_forward_search (count, key)
-     int count, key;
+     int count __attribute__((unused)), key;
 {
   return noninc_search (1, (key == '?') ? '?' : 0);
 }
@@ -392,7 +392,7 @@ rl_noninc_forward_search (count, key)
    calls this, KEY will be `/'. */
 int
 rl_noninc_reverse_search (count, key)
-     int count, key;
+     int count __attribute__((unused)), key;
 {
   return noninc_search (-1, (key == '/') ? '/' : 0);
 }
@@ -401,7 +401,7 @@ rl_noninc_reverse_search (count, key)
    for.  If there is no saved search string, abort. */
 int
 rl_noninc_forward_search_again (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   int r;
 
@@ -418,7 +418,7 @@ rl_noninc_forward_search_again (count, k
    for.  If there is no saved search string, abort. */
 int
 rl_noninc_reverse_search_again (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   int r;
 

=== modified file 'cmd-line-utils/readline/terminal.c'
--- a/cmd-line-utils/readline/terminal.c	2008-01-03 13:26:41 +0000
+++ b/cmd-line-utils/readline/terminal.c	2009-06-29 13:17:01 +0000
@@ -104,34 +104,36 @@ char PC, *BC, *UP;
 #endif /* __linux__ */
 
 /* Some strings to control terminal actions.  These are output by tputs (). */
-char *_rl_term_clreol;
-char *_rl_term_clrpag;
-char *_rl_term_cr;
-char *_rl_term_backspace;
-char *_rl_term_goto;
-char *_rl_term_pc;
+const char *_rl_term_clreol;
+const char *_rl_term_clrpag;
+const char *_rl_term_cr;
+const char *_rl_term_backspace;
+char _rl_term_backspace_default[2] = { '\b', 0 };
+const char *_rl_term_goto;
+const char *_rl_term_pc;
 
 /* Non-zero if we determine that the terminal can do character insertion. */
 int _rl_terminal_can_insert = 0;
 
 /* How to insert characters. */
-char *_rl_term_im;
-char *_rl_term_ei;
-char *_rl_term_ic;
-char *_rl_term_ip;
-char *_rl_term_IC;
+const char *_rl_term_im;
+const char *_rl_term_ei;
+const char *_rl_term_ic;
+const char *_rl_term_ip;
+const char *_rl_term_IC;
 
 /* How to delete characters. */
-char *_rl_term_dc;
-char *_rl_term_DC;
+const char *_rl_term_dc;
+const char *_rl_term_DC;
 
-char *_rl_term_forward_char;
+const char *_rl_term_forward_char;
 
 /* How to go up a line. */
-char *_rl_term_up;
+const char *_rl_term_up;
+char _rl_term_up_default[2] = { 0, 0 };
 
 /* A visible bell; char if the terminal can be made to flash the screen. */
-static char *_rl_visible_bell;
+static const char *_rl_visible_bell;
 
 /* Non-zero means the terminal can auto-wrap lines. */
 int _rl_term_autowrap = -1;
@@ -141,33 +143,33 @@ static int term_has_meta;
 
 /* The sequences to write to turn on and off the meta key, if this
    terminal has one. */
-static char *_rl_term_mm;
-static char *_rl_term_mo;
+static const char *_rl_term_mm;
+static const char *_rl_term_mo;
 
 /* The key sequences output by the arrow keys, if this terminal has any. */
-static char *_rl_term_ku;
-static char *_rl_term_kd;
-static char *_rl_term_kr;
-static char *_rl_term_kl;
+static const char *_rl_term_ku;
+static const char *_rl_term_kd;
+static const char *_rl_term_kr;
+static const char *_rl_term_kl;
 
 /* How to initialize and reset the arrow keys, if this terminal has any. */
-static char *_rl_term_ks;
-static char *_rl_term_ke;
+static const char *_rl_term_ks;
+static const char *_rl_term_ke;
 
 /* The key sequences sent by the Home and End keys, if any. */
-static char *_rl_term_kh;
-static char *_rl_term_kH;
-static char *_rl_term_at7;	/* @7 */
+static const char *_rl_term_kh;
+static const char *_rl_term_kH;
+static const char *_rl_term_at7;	/* @7 */
 
 /* Delete key */
-static char *_rl_term_kD;
+static const char *_rl_term_kD;
 
 /* Insert key */
-static char *_rl_term_kI;
+static const char *_rl_term_kI;
 
 /* Cursor control */
-static char *_rl_term_vs;	/* very visible */
-static char *_rl_term_ve;	/* normal */
+static const char *_rl_term_vs;	/* very visible */
+static const char *_rl_term_ve;	/* normal */
 
 static void bind_termcap_arrow_keys PARAMS((Keymap));
 
@@ -362,7 +364,7 @@ rl_resize_terminal ()
 
 struct _tc_string {
      const char *tc_var;
-     char **tc_value;
+     const char **tc_value;
 };
 
 /* This should be kept sorted, just in case we decide to change the
@@ -409,7 +411,7 @@ get_term_capabilities (bp)
      char **bp;
 {
 #if !defined (__DJGPP__)	/* XXX - doesn't DJGPP have a termcap library? */
-  register int i;
+  register unsigned int i;
 
   for (i = 0; i < NUM_TC_STRINGS; i++)
     *(tc_strings[i].tc_value) = tgetstr ((char *)tc_strings[i].tc_var, bp);
@@ -496,8 +498,9 @@ _rl_init_terminal_io (terminal_name)
          tgoto if _rl_term_IC or _rl_term_DC is defined, but just in case we
          change that later... */
       PC = '\0';
-      BC = _rl_term_backspace = "\b";
-      UP = _rl_term_up;
+      _rl_term_backspace = _rl_term_backspace_default;
+      BC = (char*)_rl_term_backspace;
+      UP = (char*)_rl_term_up;
 
       return 0;
     }
@@ -507,8 +510,8 @@ _rl_init_terminal_io (terminal_name)
   /* Set up the variables that the termcap library expects the application
      to provide. */
   PC = _rl_term_pc ? *_rl_term_pc : 0;
-  BC = _rl_term_backspace;
-  UP = _rl_term_up;
+  BC = (char*)_rl_term_backspace;
+  UP = (char*)_rl_term_up;
 
   if (!_rl_term_cr)
     _rl_term_cr = "\r";
@@ -568,11 +571,11 @@ bind_termcap_arrow_keys (map)
   _rl_keymap = xkeymap;
 }
 
-char *
+const char *
 rl_get_termcap (cap)
      const char *cap;
 {
-  register int i;
+  register unsigned int i;
 
   if (tcap_initialized == 0)
     return ((char *)NULL);

=== modified file 'cmd-line-utils/readline/text.c'
--- a/cmd-line-utils/readline/text.c	2008-04-28 16:24:05 +0000
+++ b/cmd-line-utils/readline/text.c	2009-06-29 14:56:06 +0000
@@ -410,7 +410,7 @@ rl_backward (count, key)
 /* Move to the beginning of the line. */
 int
 rl_beg_of_line (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   rl_point = 0;
   return 0;
@@ -419,7 +419,7 @@ rl_beg_of_line (count, key)
 /* Move to the end of the line. */
 int
 rl_end_of_line (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   rl_point = rl_end;
   return 0;
@@ -527,7 +527,7 @@ rl_backward_word (count, key)
 /* Clear the current line.  Numeric argument to C-l does this. */
 int
 rl_refresh_line (ignore1, ignore2)
-     int ignore1, ignore2;
+     int ignore1 __attribute__((unused)), ignore2 __attribute__((unused));
 {
   int curr_line;
 
@@ -566,7 +566,7 @@ rl_clear_screen (count, key)
 
 int
 rl_arrow_keys (count, c)
-     int count, c;
+     int count, c __attribute__((unused));
 {
   int ch;
 
@@ -884,7 +884,7 @@ _rl_insert_next_callback (data)
   
 int
 rl_quoted_insert (count, key)
-     int count, key;
+     int count, key __attribute__((unused));
 {
   /* Let's see...should the callback interface futz with signal handling? */
 #if defined (HANDLE_SIGNALS)
@@ -907,7 +907,7 @@ rl_quoted_insert (count, key)
 /* Insert a tab character. */
 int
 rl_tab_insert (count, key)
-     int count, key;
+     int count, key __attribute__((unused));
 {
   return (_rl_insert_char (count, '\t'));
 }
@@ -917,7 +917,7 @@ rl_tab_insert (count, key)
    meaning in the future. */
 int
 rl_newline (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   rl_done = 1;
 
@@ -951,7 +951,7 @@ rl_newline (count, key)
    is special cased. */
 int
 rl_do_lowercase_version (ignore1, ignore2)
-     int ignore1, ignore2;
+     int ignore1 __attribute__((unused)), ignore2 __attribute__((unused));
 {
   return 0;
 }
@@ -1118,7 +1118,7 @@ rl_rubout_or_delete (count, key)
 /* Delete all spaces and tabs around point. */
 int
 rl_delete_horizontal_space (count, ignore)
-     int count, ignore;
+     int count __attribute__((unused)), ignore __attribute__((unused));
 {
   int start = rl_point;
 
@@ -1163,9 +1163,9 @@ rl_delete_or_show_completions (count, ke
    A K*rn shell style function. */
 int
 rl_insert_comment (count, key)
-     int count, key;
+     int count __attribute__((unused)), key;
 {
-  char *rl_comment_text;
+  const char *rl_comment_text;
   int rl_comment_len;
 
   rl_beg_of_line (1, key);
@@ -1202,7 +1202,7 @@ rl_insert_comment (count, key)
 /* Uppercase the word at point. */
 int
 rl_upcase_word (count, key)
-     int count, key;
+     int count, key __attribute__((unused));
 {
   return (rl_change_case (count, UpCase));
 }
@@ -1210,7 +1210,7 @@ rl_upcase_word (count, key)
 /* Lowercase the word at point. */
 int
 rl_downcase_word (count, key)
-     int count, key;
+     int count, key __attribute__((unused));
 {
   return (rl_change_case (count, DownCase));
 }
@@ -1218,7 +1218,7 @@ rl_downcase_word (count, key)
 /* Upcase the first letter, downcase the rest. */
 int
 rl_capitalize_word (count, key)
-     int count, key;
+     int count, key __attribute__((unused));
 {
  return (rl_change_case (count, CapCase));
 }
@@ -1381,7 +1381,7 @@ rl_transpose_words (count, key)
    then transpose the characters before point. */
 int
 rl_transpose_chars (count, key)
-     int count, key;
+     int count, key __attribute__((unused));
 {
 #if defined (HANDLE_MULTIBYTE)
   char *dummy;
@@ -1560,7 +1560,7 @@ _rl_char_search_callback (data)
 
 int
 rl_char_search (count, key)
-     int count, key;
+     int count, key __attribute__((unused));
 {
 #if defined (READLINE_CALLBACKS)
   if (RL_ISSTATE (RL_STATE_CALLBACK))
@@ -1578,7 +1578,7 @@ rl_char_search (count, key)
 
 int
 rl_backward_char_search (count, key)
-     int count, key;
+     int count, key __attribute__((unused));
 {
 #if defined (READLINE_CALLBACKS)
   if (RL_ISSTATE (RL_STATE_CALLBACK))
@@ -1615,7 +1615,7 @@ _rl_set_mark_at_pos (position)
 /* A bindable command to set the mark. */
 int
 rl_set_mark (count, key)
-     int count, key;
+     int count, key __attribute__((unused));
 {
   return (_rl_set_mark_at_pos (rl_explicit_arg ? count : rl_point));
 }
@@ -1623,7 +1623,7 @@ rl_set_mark (count, key)
 /* Exchange the position of mark and point. */
 int
 rl_exchange_point_and_mark (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   if (rl_mark > rl_end)
     rl_mark = -1;

=== modified file 'cmd-line-utils/readline/tilde.c'
--- a/cmd-line-utils/readline/tilde.c	2008-01-03 13:26:41 +0000
+++ b/cmd-line-utils/readline/tilde.c	2009-06-29 13:17:01 +0000
@@ -196,7 +196,7 @@ tilde_expand (string)
   int result_size, result_index;
 
   result_index = result_size = 0;
-  if (result = strchr (string, '~'))
+  if ((result = strchr (string, '~')))
     result = (char *)xmalloc (result_size = (strlen (string) + 16));
   else
     result = (char *)xmalloc (result_size = (strlen (string) + 1));

=== modified file 'cmd-line-utils/readline/undo.c'
--- a/cmd-line-utils/readline/undo.c	2008-01-23 16:43:46 +0000
+++ b/cmd-line-utils/readline/undo.c	2009-06-29 14:00:47 +0000
@@ -231,7 +231,8 @@ rl_do_undo ()
 
 int
 _rl_fix_last_undo_of_type (type, start, end)
-     int type, start, end;
+     enum undo_code type;
+     int start, end;
 {
   UNDO_LIST *rl;
 
@@ -289,7 +290,7 @@ rl_modifying (start, end)
 /* Revert the current line to its previous state. */
 int
 rl_revert_line (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   if (!rl_undo_list)
     rl_ding ();
@@ -309,7 +310,7 @@ rl_revert_line (count, key)
 /* Do some undoing of things that were done. */
 int
 rl_undo_command (count, key)
-     int count, key;
+     int count, key __attribute__((unused));
 {
   if (count < 0)
     return 0;	/* Nothing to do. */

=== modified file 'cmd-line-utils/readline/util.c'
--- a/cmd-line-utils/readline/util.c	2008-01-03 13:26:41 +0000
+++ b/cmd-line-utils/readline/util.c	2009-06-29 13:17:01 +0000
@@ -115,14 +115,14 @@ _rl_abort_internal ()
 
 int
 rl_abort (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   return (_rl_abort_internal ());
 }
 
 int
 rl_tty_status (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
 #if defined (TIOCSTAT)
   ioctl (1, TIOCSTAT, (char *)0);
@@ -172,7 +172,7 @@ rl_extend_line_buffer (len)
 /* A function for simple tilde expansion. */
 int
 rl_tilde_expand (ignore, key)
-     int ignore, key;
+     int ignore __attribute__((unused)), key __attribute__((unused));
 {
   register int start, end;
   char *homedir, *temp;

=== modified file 'cmd-line-utils/readline/vi_mode.c'
--- a/cmd-line-utils/readline/vi_mode.c	2008-01-03 13:26:41 +0000
+++ b/cmd-line-utils/readline/vi_mode.c	2009-06-29 13:17:01 +0000
@@ -131,7 +131,7 @@ static int _rl_vi_callback_char_search P
 void
 _rl_vi_initialize_line ()
 {
-  register int i;
+  register size_t i;
 
   for (i = 0; i < sizeof (vi_mark_chars) / sizeof (int); i++)
     vi_mark_chars[i] = -1;
@@ -190,7 +190,7 @@ _rl_vi_stuff_insert (count)
    puts you back into insert mode. */
 int
 rl_vi_redo (count, c)
-     int count, c;
+     int count, c __attribute__((unused));
 {
   int r;
 
@@ -238,7 +238,7 @@ rl_vi_undo (count, key)
 /* Yank the nth arg from the previous line into this line at point. */
 int
 rl_vi_yank_arg (count, key)
-     int count, key;
+     int count, key __attribute__((unused));
 {
   /* Readline thinks that the first word on a line is the 0th, while vi
      thinks the first word on a line is the 1st.  Compensate. */
@@ -321,7 +321,7 @@ rl_vi_search (count, key)
 /* Completion, from vi's point of view. */
 int
 rl_vi_complete (ignore, key)
-     int ignore, key;
+     int ignore __attribute__((unused)), key;
 {
   if ((rl_point < rl_end) && (!whitespace (rl_line_buffer[rl_point])))
     {
@@ -348,7 +348,7 @@ rl_vi_complete (ignore, key)
 /* Tilde expansion for vi mode. */
 int
 rl_vi_tilde_expand (ignore, key)
-     int ignore, key;
+     int ignore __attribute__((unused)), key;
 {
   rl_tilde_expand (0, key);
   rl_vi_start_inserting (key, 1, rl_arg_sign);
@@ -419,7 +419,7 @@ rl_vi_end_word (count, key)
 /* Move forward a word the way that 'W' does. */
 int
 rl_vi_fWord (count, ignore)
-     int count, ignore;
+     int count, ignore __attribute__((unused));
 {
   while (count-- && rl_point < (rl_end - 1))
     {
@@ -436,7 +436,7 @@ rl_vi_fWord (count, ignore)
 
 int
 rl_vi_bWord (count, ignore)
-     int count, ignore;
+     int count, ignore __attribute__((unused));
 {
   while (count-- && rl_point > 0)
     {
@@ -460,7 +460,7 @@ rl_vi_bWord (count, ignore)
 
 int
 rl_vi_eWord (count, ignore)
-     int count, ignore;
+     int count, ignore __attribute__((unused));
 {
   while (count-- && rl_point < (rl_end - 1))
     {
@@ -491,7 +491,7 @@ rl_vi_eWord (count, ignore)
 
 int
 rl_vi_fword (count, ignore)
-     int count, ignore;
+     int count, ignore __attribute__((unused));
 {
   while (count-- && rl_point < (rl_end - 1))
     {
@@ -517,7 +517,7 @@ rl_vi_fword (count, ignore)
 
 int
 rl_vi_bword (count, ignore)
-     int count, ignore;
+     int count, ignore __attribute__((unused));
 {
   while (count-- && rl_point > 0)
     {
@@ -556,7 +556,7 @@ rl_vi_bword (count, ignore)
 
 int
 rl_vi_eword (count, ignore)
-     int count, ignore;
+     int count, ignore __attribute__((unused));
 {
   while (count-- && rl_point < rl_end - 1)
     {
@@ -581,7 +581,7 @@ rl_vi_eword (count, ignore)
 
 int
 rl_vi_insert_beg (count, key)
-     int count, key;
+     int count __attribute__((unused)), key;
 {
   rl_beg_of_line (1, key);
   rl_vi_insertion_mode (1, key);
@@ -610,7 +610,7 @@ _rl_vi_append_forward (key)
 
 int
 rl_vi_append_mode (count, key)
-     int count, key;
+     int count __attribute__((unused)), key;
 {
   _rl_vi_append_forward (key);
   rl_vi_start_inserting (key, 1, rl_arg_sign);
@@ -619,7 +619,7 @@ rl_vi_append_mode (count, key)
 
 int
 rl_vi_append_eol (count, key)
-     int count, key;
+     int count __attribute__((unused)), key;
 {
   rl_end_of_line (1, key);
   rl_vi_append_mode (1, key);
@@ -629,7 +629,7 @@ rl_vi_append_eol (count, key)
 /* What to do in the case of C-d. */
 int
 rl_vi_eof_maybe (count, c)
-     int count, c;
+     int count __attribute__((unused)), c __attribute__((unused));
 {
   return (rl_newline (1, '\n'));
 }
@@ -640,7 +640,7 @@ rl_vi_eof_maybe (count, c)
    switching keymaps. */
 int
 rl_vi_insertion_mode (count, key)
-     int count, key;
+     int count __attribute__((unused)), key;
 {
   _rl_keymap = vi_insertion_keymap;
   _rl_vi_last_key_before_insert = key;
@@ -703,7 +703,7 @@ _rl_vi_done_inserting ()
 
 int
 rl_vi_movement_mode (count, key)
-     int count, key;
+     int count __attribute__((unused)), key;
 {
   if (rl_point > 0)
     rl_backward_char (1, key);
@@ -783,7 +783,7 @@ _rl_vi_change_mbchar_case (count)
 
 int
 rl_vi_change_case (count, ignore)
-     int count, ignore;
+     int count, ignore __attribute__((unused));
 {
   int c, p;
 
@@ -1031,7 +1031,7 @@ rl_digit_loop1 ()
 
 int
 rl_vi_delete_to (count, key)
-     int count, key;
+     int count __attribute__((unused)), key;
 {
   int c;
 
@@ -1057,7 +1057,7 @@ rl_vi_delete_to (count, key)
 
 int
 rl_vi_change_to (count, key)
-     int count, key;
+     int count __attribute__((unused)), key;
 {
   int c, start_pos;
 
@@ -1110,7 +1110,7 @@ rl_vi_change_to (count, key)
 
 int
 rl_vi_yank_to (count, key)
-     int count, key;
+     int count __attribute__((unused)), key;
 {
   int c, save;
 
@@ -1202,7 +1202,7 @@ rl_vi_delete (count, key)
 
 int
 rl_vi_back_to_indent (count, key)
-     int count, key;
+     int count __attribute__((unused)), key;
 {
   rl_beg_of_line (1, key);
   while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point]))
@@ -1212,7 +1212,7 @@ rl_vi_back_to_indent (count, key)
 
 int
 rl_vi_first_print (count, key)
-     int count, key;
+     int count __attribute__((unused)), key;
 {
   return (rl_vi_back_to_indent (1, key));
 }
@@ -1319,7 +1319,7 @@ rl_vi_char_search (count, key)
 /* Match brackets */
 int
 rl_vi_match (ignore, key)
-     int ignore, key;
+     int ignore __attribute__((unused)), key;
 {
   int count = 1, brack, pos, tmp, pre;
 
@@ -1426,7 +1426,7 @@ rl_vi_bracktype (c)
 static int
 _rl_vi_change_char (count, c, mb)
      int count, c;
-     char *mb;
+     char *mb __attribute__((unused));
 {
   int p;
 
@@ -1458,8 +1458,8 @@ _rl_vi_change_char (count, c, mb)
 
 static int
 _rl_vi_callback_getchar (mb, mlen)
-     char *mb;
-     int mlen;
+     char *mb __attribute__((unused));
+     int mlen __attribute__((unused));
 {
   int c;
 
@@ -1494,7 +1494,7 @@ _rl_vi_callback_change_char (data)
 
 int
 rl_vi_change_char (count, key)
-     int count, key;
+     int count, key __attribute__((unused));
 {
   int c;
   char mb[MB_LEN_MAX];
@@ -1582,7 +1582,7 @@ rl_vi_overstrike_delete (count, key)
 
 int
 rl_vi_replace (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
   int i;
 
@@ -1663,7 +1663,7 @@ _rl_vi_set_mark ()
 #if defined (READLINE_CALLBACKS)
 static int
 _rl_vi_callback_set_mark (data)
-     _rl_callback_generic_arg *data;
+     _rl_callback_generic_arg *data __attribute__((unused));
 {
   _rl_callback_func = 0;
   _rl_want_redisplay = 1;
@@ -1674,7 +1674,7 @@ _rl_vi_callback_set_mark (data)
 
 int
 rl_vi_set_mark (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
 #if defined (READLINE_CALLBACKS)
   if (RL_ISSTATE (RL_STATE_CALLBACK))
@@ -1721,7 +1721,7 @@ _rl_vi_goto_mark ()
 #if defined (READLINE_CALLBACKS)
 static int
 _rl_vi_callback_goto_mark (data)
-     _rl_callback_generic_arg *data;
+     _rl_callback_generic_arg *data __attribute__((unused));
 {
   _rl_callback_func = 0;
   _rl_want_redisplay = 1;
@@ -1732,7 +1732,7 @@ _rl_vi_callback_goto_mark (data)
 
 int
 rl_vi_goto_mark (count, key)
-     int count, key;
+     int count __attribute__((unused)), key __attribute__((unused));
 {
 #if defined (READLINE_CALLBACKS)
   if (RL_ISSTATE (RL_STATE_CALLBACK))

=== modified file 'extra/yassl/src/handshake.cpp'
--- a/extra/yassl/src/handshake.cpp	2009-05-15 13:45:06 +0000
+++ b/extra/yassl/src/handshake.cpp	2009-06-29 14:56:06 +0000
@@ -790,15 +790,17 @@ void processReply(SSL& ssl)
     if (ssl.GetError()) return;
 
     if (DoProcessReply(ssl))
+    {
         // didn't complete process
         if (!ssl.getSocket().IsNonBlocking()) {
             // keep trying now, blocking ok
             while (!ssl.GetError())
                 if (DoProcessReply(ssl) == 0) break;
-    }
+        }
         else
             // user will have try again later, non blocking
             ssl.SetError(YasslError(SSL_ERROR_WANT_READ));
+    }
 }
 
 
@@ -873,10 +875,12 @@ void sendServerKeyExchange(SSL& ssl, Buf
 void sendChangeCipher(SSL& ssl, BufferOutput buffer)
 {
     if (ssl.getSecurity().get_parms().entity_ == server_end)
+    {
         if (ssl.getSecurity().get_resuming())
             ssl.verifyState(clientKeyExchangeComplete);
         else
             ssl.verifyState(clientFinishedComplete);
+    }
     if (ssl.GetError()) return;
 
     ChangeCipherSpec ccs;

=== modified file 'extra/yassl/src/yassl_imp.cpp'
--- a/extra/yassl/src/yassl_imp.cpp	2009-05-15 13:45:06 +0000
+++ b/extra/yassl/src/yassl_imp.cpp	2009-06-29 14:56:06 +0000
@@ -1305,6 +1305,7 @@ void ServerHello::Process(input_buffer&,
         ssl.useSecurity().use_connection().sessionID_Set_ = false;
 
     if (ssl.getSecurity().get_resuming())
+    {
         if (memcmp(session_id_, ssl.getSecurity().get_resume().GetID(),
                    ID_LEN) == 0) {
             ssl.set_masterSecret(ssl.getSecurity().get_resume().GetSecret());
@@ -1319,6 +1320,7 @@ void ServerHello::Process(input_buffer&,
             ssl.useSecurity().set_resuming(false);
             ssl.useLog().Trace("server denied resumption");
         }
+    }
 
     if (ssl.CompressionOn() && !compression_method_)
         ssl.UnSetCompression(); // server isn't supporting yaSSL zlib request

=== modified file 'extra/yassl/taocrypt/include/modes.hpp'
--- a/extra/yassl/taocrypt/include/modes.hpp	2007-03-23 12:43:09 +0000
+++ b/extra/yassl/taocrypt/include/modes.hpp	2009-06-29 14:00:47 +0000
@@ -96,10 +96,12 @@ inline void Mode_BASE::Process(byte* out
     if (mode_ == ECB)
         ECB_Process(out, in, sz);
     else if (mode_ == CBC)
+    {
         if (dir_ == ENCRYPTION)
             CBC_Encrypt(out, in, sz);
         else
             CBC_Decrypt(out, in, sz);
+    }
 }
 
 

=== modified file 'extra/yassl/taocrypt/src/asn.cpp'
--- a/extra/yassl/taocrypt/src/asn.cpp	2009-03-17 20:07:27 +0000
+++ b/extra/yassl/taocrypt/src/asn.cpp	2009-06-29 14:56:06 +0000
@@ -781,10 +781,12 @@ void CertDecoder::GetDate(DateType dt)
     source_.advance(length);
 
     if (!ValidateDate(date, b, dt) && verify_)
+    {
         if (dt == BEFORE)
             source_.SetError(BEFORE_DATE_E);
         else
             source_.SetError(AFTER_DATE_E);
+    }
 
     // save for later use
     if (dt == BEFORE) {
@@ -1062,6 +1064,7 @@ word32 DecodeDSA_Signature(byte* decoded
     }
     word32 rLen = GetLength(source);
     if (rLen != 20)
+    {
         if (rLen == 21) {       // zero at front, eat
             source.next();
             --rLen;
@@ -1074,6 +1077,7 @@ word32 DecodeDSA_Signature(byte* decoded
             source.SetError(DSA_SZ_E);
             return 0;
         }
+    }
     memcpy(decoded, source.get_buffer() + source.get_index(), rLen);
     source.advance(rLen);
 
@@ -1084,6 +1088,7 @@ word32 DecodeDSA_Signature(byte* decoded
     }
     word32 sLen = GetLength(source);
     if (sLen != 20)
+    {
         if (sLen == 21) {
             source.next();          // zero at front, eat
             --sLen;
@@ -1096,6 +1101,7 @@ word32 DecodeDSA_Signature(byte* decoded
             source.SetError(DSA_SZ_E);
             return 0;
         }
+    }
     memcpy(decoded + rLen, source.get_buffer() + source.get_index(), sLen);
     source.advance(sLen);
 

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2009-06-18 18:09:30 +0000
+++ b/sql/log_event.cc	2009-06-29 14:56:06 +0000
@@ -4372,7 +4372,7 @@ void Load_log_event::print(FILE* file_ar
     {
       if (i)
 	my_b_printf(&cache, ",");
-      my_b_printf(&cache, field);
+      my_b_printf(&cache, "%s", field);
 	  
       field += field_lens[i]  + 1;
     }
@@ -6704,7 +6704,7 @@ void Execute_load_query_log_event::print
   {
     my_b_write(&cache, (uchar*) query, fn_pos_start);
     my_b_printf(&cache, " LOCAL INFILE \'");
-    my_b_printf(&cache, local_fname);
+    my_b_printf(&cache, "%s", local_fname);
     my_b_printf(&cache, "\'");
     if (dup_handling == LOAD_DUP_REPLACE)
       my_b_printf(&cache, " REPLACE");

=== modified file 'sql/sql_repl.cc'
--- a/sql/sql_repl.cc	2009-06-25 23:28:42 +0000
+++ b/sql/sql_repl.cc	2009-06-29 14:56:06 +0000
@@ -151,7 +151,7 @@ static int send_file(THD *thd)
   if (errmsg)
   {
     sql_print_error("Failed in send_file() %s", errmsg);
-    DBUG_PRINT("error", (errmsg));
+    DBUG_PRINT("error", ("%s", errmsg));
   }
   DBUG_RETURN(error);
 }

=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	2009-06-19 09:28:44 +0000
+++ b/sql/sql_table.cc	2009-06-29 14:56:06 +0000
@@ -4856,7 +4856,7 @@ send_result_message:
           const char *err_msg= thd->stmt_da->message();
           if (!thd->vio_ok())
           {
-            sql_print_error(err_msg);
+            sql_print_error("%s", err_msg);
           }
           else
           {

=== modified file 'sql/thr_malloc.cc'
--- a/sql/thr_malloc.cc	2009-04-06 18:36:46 +0000
+++ b/sql/thr_malloc.cc	2009-06-29 14:56:06 +0000
@@ -21,7 +21,7 @@
 extern "C" {
   void sql_alloc_error_handler(void)
   {
-    sql_print_error(ER(ER_OUT_OF_RESOURCES));
+    sql_print_error("%s", ER(ER_OUT_OF_RESOURCES));
 
     THD *thd= current_thd;
     if (thd)

=== modified file 'storage/myisam/ha_myisam.cc'
--- a/storage/myisam/ha_myisam.cc	2009-06-05 13:54:23 +0000
+++ b/storage/myisam/ha_myisam.cc	2009-06-29 14:56:06 +0000
@@ -95,7 +95,7 @@ static void mi_check_print_msg(HA_CHECK 
 
   if (!thd->vio_ok())
   {
-    sql_print_error(msgbuf);
+    sql_print_error("%s", msgbuf);
     return;
   }
 

=== modified file 'strings/decimal.c'
--- a/strings/decimal.c	2009-05-14 21:49:53 +0000
+++ b/strings/decimal.c	2009-06-29 14:56:06 +0000
@@ -300,7 +300,7 @@ int decimal_actual_fraction(decimal_t *f
   {
     for (i= DIG_PER_DEC1 - ((frac - 1) % DIG_PER_DEC1);
          *buf0 % powers10[i++] == 0;
-         frac--);
+         frac--) ;
   }
   return frac;
 }
@@ -494,7 +494,7 @@ static void digits_bounds(decimal_t *fro
     stop= (int) ((buf_end - from->buf + 1) * DIG_PER_DEC1);
     i= 1;
   }
-  for (; *buf_end % powers10[i++] == 0; stop--);
+  for (; *buf_end % powers10[i++] == 0; stop--) ;
   *end_result= stop; /* index of position after last decimal digit (from 0) */
 }
 
@@ -994,7 +994,7 @@ static int ull2dec(ulonglong from, decim
 
   sanity(to);
 
-  for (intg1=1; from >= DIG_BASE; intg1++, from/=DIG_BASE);
+  for (intg1=1; from >= DIG_BASE; intg1++, from/=DIG_BASE) ;
   if (unlikely(intg1 > to->len))
   {
     intg1=to->len;


Attachment: [text/bzr-bundle] bzr/staale.smedseng@sun.com-20090629145606-wlw34tcfyx15g0k5.bundle
Thread
bzr commit into mysql-pe branch (staale.smedseng:3415) Staale Smedseng29 Jun