MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Staale Smedseng Date:October 2 2009 9:34am
Subject:bzr push into mysql-pe branch (staale.smedseng:3616 to 3617) Bug#43414
View as plain text  
 3617 Staale Smedseng	2009-10-02
      Bug #43414 Parenthesis (and other) warnings compiling MySQL
      with gcc 4.3.2.
     @ mysys/my_handler.c
        Wrong argument to my_error_register() after parameter
        change. Used in extra/perror application.
     @ unittest/backup/bstr_data_chunks-t.c
        Could possibly free memory not allocated and close
        non-open stream.

    modified:
      cmd-line-utils/readline/rlmbutil.h
      mysys/lf_alloc-pin.c
      mysys/my_handler.c
      sql-common/client.c
      sql/backup/backup_info.cc
      sql/backup/error.h
      sql/backup/kernel.cc
      sql/backup/logger.cc
      sql/ha_partition.cc
      sql/handler.cc
      sql/item_strfunc.cc
      sql/item_sum.cc
      sql/log.cc
      sql/opt_range.cc
      sql/rpl_rli_file.cc
      sql/slave.cc
      sql/sql_acl.cc
      sql/sql_base.cc
      sql/sql_insert.cc
      sql/sql_plugin.cc
      sql/sql_plugin_services.h
      sql/sql_repl.cc
      sql/sql_select.cc
      storage/myisam/mi_create.c
      storage/myisam/mi_log.c
      strings/ctype-ucs2.c
      strings/dtoa.c
      strings/my_vsnprintf.c
      unittest/backup/bstr_callback_errors-t.c
      unittest/backup/bstr_data_chunks-t.c
      unittest/backup/catalog.c
      unittest/backup/test_stream.c
      unittest/mysys/safe_cleanup_cat_path-t.c
 3616 Joerg Bruehe	2009-10-01 [merge]
      Automerge from parent tree.

    added:
      mysql-test/extra/rpl_tests/rpl_auto_increment_insert_view.test
      mysql-test/extra/rpl_tests/rpl_auto_increment_invoke_trigger.test
      mysql-test/extra/rpl_tests/rpl_autoinc_func_invokes_trigger.test
      mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result
      mysql-test/suite/rpl/t/rpl_auto_increment_update_failure.test
    modified:
      mysql-test/extra/rpl_tests/rpl_insert_id.test
      mysql-test/suite/backup_ptr/t/backup_ptr_objects.test
      mysql-test/suite/rpl/t/rpl_variables_stm.test
      sql/sql_base.cc
=== modified file 'cmd-line-utils/readline/rlmbutil.h'
--- a/cmd-line-utils/readline/rlmbutil.h	2007-11-19 13:38:08 +0000
+++ b/cmd-line-utils/readline/rlmbutil.h	2009-10-02 09:33:37 +0000
@@ -109,8 +109,8 @@ extern int _rl_is_mbchar_matched PARAMS(
 extern wchar_t _rl_char_value PARAMS((char *, int));
 extern int _rl_walphabetic PARAMS((wchar_t));
 
-#define _rl_to_wupper(wc)	(iswlower (wc) ? towupper (wc) : (wc))
-#define _rl_to_wlower(wc)	(iswupper (wc) ? towlower (wc) : (wc))
+#define _rl_to_wupper(wc)	(iswlower (wc) ? (wchar_t)towupper (wc) : (wc))
+#define _rl_to_wlower(wc)	(iswupper (wc) ? (wchar_t)towlower (wc) : (wc))
 
 #define MB_NEXTCHAR(b,s,c,f) \
 	((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \

=== modified file 'mysys/lf_alloc-pin.c'
--- a/mysys/lf_alloc-pin.c	2009-04-23 21:17:43 +0000
+++ b/mysys/lf_alloc-pin.c	2009-10-02 09:33:37 +0000
@@ -329,10 +329,9 @@ static void _lf_pinbox_real_free(LF_PINS
 {
   int npins, alloca_size;
   void *list, **addr;
-  void *first, *last= NULL;
+  void *UNINIT_VAR(first), *last= NULL;
   LF_PINBOX *pinbox= pins->pinbox;
 
-  LINT_INIT(first);
   npins= pinbox->pins_in_array+1;
 
 #ifdef HAVE_ALLOCA

=== modified file 'mysys/my_handler.c'
--- a/mysys/my_handler.c	2008-06-26 17:48:42 +0000
+++ b/mysys/my_handler.c	2009-10-02 09:33:37 +0000
@@ -648,6 +648,16 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyse
 
 
 /*
+   Return a pointer to the array of handler error messages. For use in
+   my_error(), by way of my_handler_error_register() below.
+ */
+static const char** get_handler_error_messages()
+{
+  return handler_error_messages;
+}
+
+
+/*
   Register handler error messages for usage with my_error()
 
   NOTES
@@ -665,7 +675,7 @@ void my_handler_error_register(void)
   */
   compile_time_assert(HA_ERR_FIRST + array_elements(handler_error_messages) ==
                       HA_ERR_LAST + 1);
-  my_error_register(handler_error_messages, HA_ERR_FIRST,
+  my_error_register(get_handler_error_messages, HA_ERR_FIRST,
                     HA_ERR_FIRST+ array_elements(handler_error_messages)-1);
 }
 

=== modified file 'sql-common/client.c'
--- a/sql-common/client.c	2009-08-31 19:43:34 +0000
+++ b/sql-common/client.c	2009-10-02 09:33:37 +0000
@@ -2390,7 +2390,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,cons
     int gai_errno;
     char port_buf[NI_MAXSERV];
     my_socket sock= SOCKET_ERROR;
-    int saved_error, status= -1;
+    int UNINIT_VAR(saved_error), status= -1;
 
     unix_socket=0;				/* This is not used */
 

=== modified file 'sql/backup/backup_info.cc'
--- a/sql/backup/backup_info.cc	2009-08-05 09:49:45 +0000
+++ b/sql/backup/backup_info.cc	2009-10-02 09:33:37 +0000
@@ -90,10 +90,9 @@ storage_engine_ref get_storage_engine(TH
       
       se= se_tmp;
     }
-#endif
 
  close:
-  
+#endif
     ::intern_close_table(table);
     my_free(table, MYF(0));
   }

=== modified file 'sql/backup/error.h'
--- a/sql/backup/error.h	2008-12-18 21:46:36 +0000
+++ b/sql/backup/error.h	2009-10-02 09:33:37 +0000
@@ -33,7 +33,7 @@ int report_mysql_error(THD* thd, SAVED_M
   {
     bool old_value= thd->no_warnings_for_error;
     thd->no_warnings_for_error= TRUE;
-    my_printf_error(err->code ? err->code : code, err->msg, MYF(0));
+    my_printf_error(err->code ? err->code : code, "%s", MYF(0), err->msg);
     thd->no_warnings_for_error= old_value;
     return 0;
   }

=== modified file 'sql/backup/kernel.cc'
--- a/sql/backup/kernel.cc	2009-08-11 11:09:31 +0000
+++ b/sql/backup/kernel.cc	2009-10-02 09:33:37 +0000
@@ -275,7 +275,7 @@ int send_error(Backup_restore_ctx &conte
     va_start(args, error_code);
 
     my_vsnprintf(buf, sizeof(buf), ER_SAFE(error_code), args);
-    my_printf_error(error_code, buf, MYF(0));
+    my_printf_error(error_code, "%s", MYF(0), buf);
 
     va_end(args);
   }

=== modified file 'sql/backup/logger.cc'
--- a/sql/backup/logger.cc	2009-03-16 14:38:05 +0000
+++ b/sql/backup/logger.cc	2009-10-02 09:33:37 +0000
@@ -66,7 +66,7 @@ int Logger::write_message(log_level::val
 
      bool saved_value= m_thd->no_warnings_for_error;
      m_thd->no_warnings_for_error= m_push_errors ? FALSE : TRUE;
-     my_printf_error(error_code, msg, MYF(0));
+     my_printf_error(error_code, "%s", MYF(0), msg);
      m_thd->no_warnings_for_error= saved_value;
  
      m_error_reported= TRUE;

=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	2009-09-29 15:03:12 +0000
+++ b/sql/ha_partition.cc	2009-10-02 09:33:37 +0000
@@ -1159,7 +1159,7 @@ int ha_partition::handle_opt_partitions(
             {
               if (part_elem->part_state == PART_ADMIN)
                 part_elem->part_state= PART_NORMAL;
-            } while (part_elem= part_it++);
+            } while ((part_elem= part_it++));
             DBUG_RETURN(error);
           }
         } while (++j < no_subparts);
@@ -1191,7 +1191,7 @@ int ha_partition::handle_opt_partitions(
           {
             if (part_elem->part_state == PART_ADMIN)
               part_elem->part_state= PART_NORMAL;
-          } while (part_elem= part_it++);
+          } while ((part_elem= part_it++));
           DBUG_RETURN(error);
         }
       }

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2009-09-29 15:03:12 +0000
+++ b/sql/handler.cc	2009-10-02 09:33:37 +0000
@@ -4367,10 +4367,9 @@ handler::multi_range_read_init(RANGE_SEQ
 
 int handler::multi_range_read_next(char **range_info)
 {
-  int result;
+  int UNINIT_VAR(result);
   int range_res;
   DBUG_ENTER("handler::multi_range_read_next");
-  LINT_INIT(result);
 
   if (!mrr_have_range)
   {

=== modified file 'sql/item_strfunc.cc'
--- a/sql/item_strfunc.cc	2009-09-25 14:15:30 +0000
+++ b/sql/item_strfunc.cc	2009-10-02 09:33:37 +0000
@@ -288,9 +288,9 @@ void Item_func_sha2::fix_length_and_dec(
   maybe_null = 1;
   max_length = 0;
 
+#if defined(HAVE_OPENSSL)
   int sha_variant= args[1]->const_item() ? args[1]->val_int() : 512;
 
-#if defined(HAVE_OPENSSL)
   switch (sha_variant) {
 #ifndef OPENSSL_NO_SHA512
   case 512:

=== modified file 'sql/item_sum.cc'
--- a/sql/item_sum.cc	2009-09-27 20:39:24 +0000
+++ b/sql/item_sum.cc	2009-10-02 09:33:37 +0000
@@ -778,8 +778,8 @@ bool Aggregator_distinct::setup(THD *thd
         enum enum_field_types type= f->type();
         tree_key_length+= f->pack_length();
         if ((type == MYSQL_TYPE_VARCHAR) ||
-            !f->binary() && (type == MYSQL_TYPE_STRING ||
-                             type == MYSQL_TYPE_VAR_STRING))
+            (!f->binary() && (type == MYSQL_TYPE_STRING ||
+                              type == MYSQL_TYPE_VAR_STRING)))
         {
           all_binary= FALSE;
           break;

=== modified file 'sql/log.cc'
--- a/sql/log.cc	2009-09-25 14:15:30 +0000
+++ b/sql/log.cc	2009-10-02 09:33:37 +0000
@@ -750,7 +750,7 @@ int Log_to_csv_event_handler::
 {
   TABLE_LIST table_list;
   TABLE *table;
-  LEX_STRING *log_name;
+  LEX_STRING *UNINIT_VAR(log_name);
   int result;
   Open_tables_state open_tables_backup;
 
@@ -4077,7 +4077,7 @@ my_bool MYSQL_BACKUP_LOG::check_backup_l
       backup logs. In this case, we reset the old error and issue the new one.
     */
     ret= TRUE;
-    sql_print_error(ER(ER_BACKUP_PROGRESS_TABLES));
+    sql_print_error("%s", ER(ER_BACKUP_PROGRESS_TABLES));
     thd->stmt_da->reset_diagnostics_area();
     thd->stmt_da->set_error_status(thd,
                                    ER_BACKUP_PROGRESS_TABLES,
@@ -4100,7 +4100,7 @@ my_bool MYSQL_BACKUP_LOG::check_backup_l
       backup logs. In this case, we reset the old error and issue the new one.
     */
     ret= TRUE;
-    sql_print_error(ER(ER_BACKUP_PROGRESS_TABLES));
+    sql_print_error("%s", ER(ER_BACKUP_PROGRESS_TABLES));
     thd->stmt_da->reset_diagnostics_area();
     thd->stmt_da->set_error_status(thd,
                                    ER_BACKUP_PROGRESS_TABLES,

=== modified file 'sql/opt_range.cc'
--- a/sql/opt_range.cc	2009-08-30 18:08:25 +0000
+++ b/sql/opt_range.cc	2009-10-02 09:33:37 +0000
@@ -4833,11 +4833,10 @@ static TRP_RANGE *get_key_scans_params(P
   uint idx;
   SEL_ARG **key,**end, **key_to_read= NULL;
   ha_rows UNINIT_VAR(best_records);              /* protected by key_to_read */
-  uint    best_mrr_flags, best_buf_size;
+  uint    UNINIT_VAR(best_mrr_flags),            /* protected by key_to_read */
+          UNINIT_VAR(best_buf_size);             /* protected by key_to_read */
   TRP_RANGE* read_plan= NULL;
   DBUG_ENTER("get_key_scans_params");
-  LINT_INIT(best_mrr_flags); /* protected by key_to_read */
-  LINT_INIT(best_buf_size); /* protected by key_to_read */
   /*
     Note that there may be trees that have type SEL_TREE::KEY but contain no
     key reads at all, e.g. tree for expression "key1 is not null" where key1

=== modified file 'sql/rpl_rli_file.cc'
--- a/sql/rpl_rli_file.cc	2009-07-06 05:54:02 +0000
+++ b/sql/rpl_rli_file.cc	2009-10-02 09:33:37 +0000
@@ -181,7 +181,7 @@ Failed to open the existing relay log in
   DBUG_RETURN(error);
 
 err:
-  sql_print_error(msg);
+  sql_print_error("%s", msg);
   end_io_cache(&info_file);
   if (info_fd >= 0)
     my_close(info_fd, MYF(0));

=== modified file 'sql/slave.cc'
--- a/sql/slave.cc	2009-09-30 23:22:49 +0000
+++ b/sql/slave.cc	2009-10-02 09:33:37 +0000
@@ -1190,7 +1190,7 @@ static bool check_io_slave_killed(THD *t
   if (io_slave_killed(thd, mi))
   {
     if (info && global_system_variables.log_warnings)
-      sql_print_information(info);
+      sql_print_information("%s", info);
     return TRUE;
   }
   return FALSE;
@@ -1572,7 +1572,7 @@ when it try to get the value of TIME_ZON
 err:
   if (err_msg.length() != 0)
   {
-    sql_print_error(err_msg.ptr());
+    sql_print_error("%s", err_msg.ptr());
     if (master_res)
       mysql_free_result(master_res);
 
@@ -2927,7 +2927,7 @@ Stopping slave I/O thread due to out-of-
         sql_print_error("\
 Stopping slave I/O thread due to Restore are running on the master");
         mi->report(ERROR_LEVEL, ER_MASTER_BLOCKING_SLAVES,
-                  ER(ER_MASTER_BLOCKING_SLAVES));
+                   "%s", ER(ER_MASTER_BLOCKING_SLAVES));
         goto err;
       }
       if (try_to_reconnect(thd, mysql, mi, &retry_count, suppress_warnings,

=== modified file 'sql/sql_acl.cc'
--- a/sql/sql_acl.cc	2009-09-29 15:12:18 +0000
+++ b/sql/sql_acl.cc	2009-10-02 09:33:37 +0000
@@ -1827,10 +1827,10 @@ bool hostname_requires_resolving(const c
   size_t localhost_len= strlen(my_localhost);
 
   if (hostname == my_localhost ||
-      hostname_len == localhost_len &&
-      !my_strnncoll(system_charset_info,
-                    (const uchar *) hostname,  hostname_len,
-		    (const uchar *) my_localhost, strlen(my_localhost)))
+      (hostname_len == localhost_len &&
+       !my_strnncoll(system_charset_info,
+                     (const uchar *) hostname,  hostname_len,
+                     (const uchar *) my_localhost, strlen(my_localhost))))
   {
     return FALSE;
   }

=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2009-10-01 14:35:40 +0000
+++ b/sql/sql_base.cc	2009-10-02 09:33:37 +0000
@@ -722,6 +722,7 @@ TABLE_SHARE *get_cached_table_share(cons
 }  
 
 
+#ifdef DISABLED_UNTIL_GRL_IS_MADE_PART_OF_MDL
 /**
    @brief Mark table share as having one more user (increase its reference
           count).
@@ -740,6 +741,8 @@ static void reference_table_share(TABLE_
   DBUG_VOID_RETURN;
 }
 
+#endif /* DISABLED_UNTIL_GRL_IS_MADE_PART_OF_MDL */
+
 
 /*
   Create a list for all open tables matching SQL expression

=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc	2009-09-29 15:03:12 +0000
+++ b/sql/sql_insert.cc	2009-10-02 09:33:37 +0000
@@ -2549,7 +2549,6 @@ err:
    */
   trans_rollback_stmt(thd);
 
-end:
   /*
     di should be unlinked from the thread handler list and have no active
     clients

=== modified file 'sql/sql_plugin.cc'
--- a/sql/sql_plugin.cc	2009-09-23 15:02:56 +0000
+++ b/sql/sql_plugin.cc	2009-10-02 09:33:37 +0000
@@ -110,7 +110,9 @@ static int cur_plugin_info_interface_ver
 
 /* support for Services */
 
+#ifdef HAVE_DLOPEN
 #include "sql_plugin_services.h"
+#endif /* HAVE_DLOPEN */
 
 /*
   A mutex LOCK_plugin must be acquired before accessing the

=== modified file 'sql/sql_plugin_services.h'
--- a/sql/sql_plugin_services.h	2009-06-22 09:36:50 +0000
+++ b/sql/sql_plugin_services.h	2009-10-02 09:33:37 +0000
@@ -26,6 +26,7 @@ struct st_service_ref {
   void *service;
 };
 
+#ifdef HAVE_DLOPEN
 static struct my_snprintf_service_st my_snprintf_handler = {
   my_snprintf,
   my_vsnprintf
@@ -45,5 +46,6 @@ static struct st_service_ref list_of_ser
   { "my_snprintf_service", VERSION_my_snprintf, &my_snprintf_handler },
   { "thd_alloc_service",   VERSION_thd_alloc,   &thd_alloc_handler }
 };
+#endif /* HAVE_DLOPEN */
 
 #endif /* SQL_PLUGIN_SERVICES_INCLUDED */

=== modified file 'sql/sql_repl.cc'
--- a/sql/sql_repl.cc	2009-09-25 14:15:30 +0000
+++ b/sql/sql_repl.cc	2009-10-02 09:33:37 +0000
@@ -836,7 +836,7 @@ impossible position";
               set_timespec_nsec(*heartbeat_ts, heartbeat_period);
             }
             ret= mysql_bin_log.wait_for_update_bin_log(thd, heartbeat_ts);
-            DBUG_ASSERT(ret == 0 || heartbeat_period != 0LL && coord != NULL);
+            DBUG_ASSERT(ret == 0 || (heartbeat_period != 0LL && coord != NULL));
             if (ret == ETIMEDOUT || ret == ETIME)
             {
 #ifndef DBUG_OFF

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2009-09-29 15:03:12 +0000
+++ b/sql/sql_select.cc	2009-10-02 09:33:37 +0000
@@ -5974,12 +5974,12 @@ public:
     bound_sj_equalities(0),
     quick_uses_applicable_index(FALSE)
   {
-    LINT_INIT(quick_max_loose_keypart); /* Protected by quick_uses_applicable_index */
+    UNINIT_VAR(quick_max_loose_keypart); /* Protected by quick_uses_applicable_index */
     /* The following are protected by best_loose_scan_cost!= DBL_MAX */
-    LINT_INIT(best_loose_scan_key);
-    LINT_INIT(best_loose_scan_records);
-    LINT_INIT(best_max_loose_keypart);
-    LINT_INIT(best_loose_scan_start_key);
+    UNINIT_VAR(best_loose_scan_key);
+    UNINIT_VAR(best_loose_scan_records);
+    UNINIT_VAR(best_max_loose_keypart);
+    UNINIT_VAR(best_loose_scan_start_key);
   }
   
   void init(JOIN *join, JOIN_TAB *s, table_map remaining_tables)

=== modified file 'storage/myisam/mi_create.c'
--- a/storage/myisam/mi_create.c	2009-08-31 20:25:11 +0000
+++ b/storage/myisam/mi_create.c	2009-10-02 09:33:37 +0000
@@ -38,7 +38,7 @@ int mi_create(const char *name,uint keys
 	      MI_CREATE_INFO *ci,uint flags)
 {
   register uint i,j;
-  File UNINIT_VAR(dfile),file;
+  File UNINIT_VAR(dfile),UNINIT_VAR(file);
   int errpos,save_errno, create_mode= O_RDWR | O_TRUNC;
   myf create_flag;
   uint fields,length,max_key_length,packed,pack_bytes,pointer,real_length_diff,
@@ -73,8 +73,6 @@ int mi_create(const char *name,uint keys
   {
     DBUG_RETURN(my_errno=HA_WRONG_CREATE_OPTION);
   }
-  LINT_INIT(dfile);
-  LINT_INIT(file);
   errpos=0;
   options=0;
   bzero((uchar*) &share,sizeof(share));

=== modified file 'storage/myisam/mi_log.c'
--- a/storage/myisam/mi_log.c	2009-02-22 18:02:16 +0000
+++ b/storage/myisam/mi_log.c	2009-10-02 09:33:37 +0000
@@ -295,7 +295,7 @@ void _myisam_log_command(IO_CACHE *log, 
                          const uchar *buffert, uint length, int result)
 {
   uchar header[14];
-  int error, old_errno, headerlen;
+  int UNINIT_VAR(error), old_errno, headerlen;
   ulong pid=(ulong) GETPID();
   my_bool logical= (log == &myisam_logical_log);
   MYISAM_SHARE *share;
@@ -317,7 +317,6 @@ void _myisam_log_command(IO_CACHE *log, 
   else
   {
     file= (share= (MYISAM_SHARE *)info_or_share)->kfile;
-    LINT_INIT(error);
   }
 
   DBUG_ASSERT(command == MI_LOG_OPEN  || command == MI_LOG_DELETE ||

=== modified file 'strings/ctype-ucs2.c'
--- a/strings/ctype-ucs2.c	2009-08-30 18:08:25 +0000
+++ b/strings/ctype-ucs2.c	2009-10-02 09:33:37 +0000
@@ -1191,11 +1191,10 @@ static int my_strnncoll_ucs2(CHARSET_INF
                              my_bool t_is_prefix)
 {
   int s_res,t_res;
-  my_wc_t s_wc,t_wc;
+  my_wc_t UNINIT_VAR(s_wc),t_wc;
   const uchar *se=s+slen;
   const uchar *te=t+tlen;
   MY_UNICASE_INFO **uni_plane= cs->caseinfo;
-  LINT_INIT(s_wc);
 
   while ( s < se && t < te )
   {

=== modified file 'strings/dtoa.c'
--- a/strings/dtoa.c	2009-04-23 21:17:43 +0000
+++ b/strings/dtoa.c	2009-10-02 09:33:37 +0000
@@ -2164,8 +2164,8 @@ static char *dtoa(double d, int mode, in
     to hold the suppressed trailing zeros.
   */
 
-  int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1,
-    j, j1, k, k0, k_check, leftright, m2, m5, s2, s5,
+  int bbits, b2, b5, be, dig, i, ieps, UNINIT_VAR(ilim), ilim0, 
+    UNINIT_VAR(ilim1), j, j1, k, k0, k_check, leftright, m2, m5, s2, s5,
     spec_case, try_quick;
   Long L;
   int denorm;
@@ -2177,8 +2177,6 @@ static char *dtoa(double d, int mode, in
   int rounding;
 #endif
   Stack_alloc alloc;
-  LINT_INIT(ilim);
-  LINT_INIT(ilim1);
   
   alloc.begin= alloc.free= buf;
   alloc.end= buf + buf_size;

=== modified file 'strings/my_vsnprintf.c'
--- a/strings/my_vsnprintf.c	2009-07-03 05:54:09 +0000
+++ b/strings/my_vsnprintf.c	2009-10-02 09:33:37 +0000
@@ -413,7 +413,7 @@ start:
       {
         char *par= args_arr[print_arr[i].arg_idx].str_arg;
         width= (print_arr[i].flags & WIDTH_ARG) ?
-          args_arr[print_arr[i].width].longlong_arg : print_arr[i].width;
+          (uint)args_arr[print_arr[i].width].longlong_arg : print_arr[i].width;
         to= process_str_arg(cs, to, end, width, par, print_arr[i].flags);
         break;
       }
@@ -421,7 +421,7 @@ start:
       {
         char *par = args_arr[print_arr[i].arg_idx].str_arg;
         width= (print_arr[i].flags & WIDTH_ARG) ?
-          args_arr[print_arr[i].width].longlong_arg : print_arr[i].width;
+          (uint)args_arr[print_arr[i].width].longlong_arg : print_arr[i].width;
         to= process_bin_arg(to, end, width, par);
         break;
       }
@@ -437,7 +437,7 @@ start:
       {
         double d= args_arr[print_arr[i].arg_idx].double_arg;
         width= (print_arr[i].flags & WIDTH_ARG) ?
-          args_arr[print_arr[i].width].longlong_arg : print_arr[i].width;
+          (uint)args_arr[print_arr[i].width].longlong_arg : print_arr[i].width;
         to= process_dbl_arg(to, end, width, d, print_arr[i].arg_type);
         break;
       }
@@ -450,7 +450,7 @@ start:
         /* Integer parameter */
         longlong larg;
         length= (print_arr[i].flags & LENGTH_ARG) ?
-          args_arr[print_arr[i].length].longlong_arg : print_arr[i].length;
+          (uint)args_arr[print_arr[i].length].longlong_arg : print_arr[i].length;
 
         if (args_arr[print_arr[i].arg_idx].have_longlong)
           larg = args_arr[print_arr[i].arg_idx].longlong_arg;

=== modified file 'unittest/backup/bstr_callback_errors-t.c'
--- a/unittest/backup/bstr_callback_errors-t.c	2009-08-21 08:19:01 +0000
+++ b/unittest/backup/bstr_callback_errors-t.c	2009-10-02 09:33:37 +0000
@@ -315,7 +315,7 @@ int fail_alloc(op_type rd_or_wr)
 int fail_callback(op_type rd_or_wr, int *cntr, uint howmuch)
 {
   struct st_callback_counts saved_counts= callback_counts;
-  int ret= 1, ret1;
+  int ret= 1, UNINIT_VAR(ret1);
 
   if (!howmuch)
   {

=== modified file 'unittest/backup/bstr_data_chunks-t.c'
--- a/unittest/backup/bstr_data_chunks-t.c	2009-06-30 20:37:35 +0000
+++ b/unittest/backup/bstr_data_chunks-t.c	2009-10-02 09:33:37 +0000
@@ -105,6 +105,7 @@ int chunks(size_t block_size, size_t chu
   if (!mem)
   {
     diag("Failed to allocate buffer for chunk data");
+    alloc= 0;
     goto end;
   }
 
@@ -175,7 +176,7 @@ int chunks(size_t block_size, size_t chu
       if (*ptr != 0xF5)
       {
         diag("Data of chunk #%lu of length %lu"
-             " corrupted at byte %d which is 0x%X.",
+             " corrupted at byte %ld which is 0x%X.",
              chunk_count, (long unsigned)data_len, ptr-data_buffer, *ptr);
         ret= 1;
         goto end;

=== modified file 'unittest/backup/catalog.c'
--- a/unittest/backup/catalog.c	2009-06-30 20:37:35 +0000
+++ b/unittest/backup/catalog.c	2009-10-02 09:33:37 +0000
@@ -483,7 +483,7 @@ void  bcat_iterator_free(struct st_bstre
                          *catalogue  __attribute__ ((__unused__)),
                          void *iter)
 {
-  uint type;
+  uint UNINIT_VAR(type);
 
   if (iter == &it_global)
     type= it_global < 0 ? BSTREAM_IT_GLOBAL : it_global;

=== modified file 'unittest/backup/test_stream.c'
--- a/unittest/backup/test_stream.c	2009-06-30 20:37:35 +0000
+++ b/unittest/backup/test_stream.c	2009-10-02 09:33:37 +0000
@@ -164,7 +164,7 @@ int read_image(image_header *hdr, const 
 {
   test_backup_stream stream;
   table_data_chunk   dchunk;
-  int ret1, ret2;
+  int ret1, UNINIT_VAR(ret2);
 
   ret1= backup_stream_open_rd(&stream, path);
   if (ret1)

=== modified file 'unittest/mysys/safe_cleanup_cat_path-t.c'
--- a/unittest/mysys/safe_cleanup_cat_path-t.c	2009-05-19 09:48:45 +0000
+++ b/unittest/mysys/safe_cleanup_cat_path-t.c	2009-10-02 09:33:37 +0000
@@ -134,6 +134,8 @@ do_multi_test(const char *path1, const c
 int
 main(void)
 {
+  int chdir_res;
+
   MY_INIT("safe_cleanup_cat_path-t");
 
   /* Set HOME for ~/ test. Trailing slash is for coverage test. */
@@ -286,7 +288,7 @@ end2:
   rmdir("dir1/dir2/dir3");
   rmdir("dir1/dir2");
   rmdir("dir1");
-  chdir("..");
+  chdir_res= chdir("..");
 end1:
   rmdir("safe_cleanup_cat_path_dir");
 end:


Attachment: [text/bzr-bundle] bzr/staale.smedseng@sun.com-20091002093337-8nkzufcvfxnrlrw5.bundle
Thread
bzr push into mysql-pe branch (staale.smedseng:3616 to 3617) Bug#43414Staale Smedseng2 Oct