Commit 25226de9 authored by unknown's avatar unknown
Browse files

Fixed compiler warnings

Don't assert if my_thread_end() is called twice (common case)


client/mysql.cc:
  Removed not used variables
client/mysqldump.c:
  Fixed compiler warnings
client/mysqltest.c:
  Fixed compiler warnings
cmd-line-utils/readline/bind.c:
  Fixed compiler warnings
cmd-line-utils/readline/histfile.c:
  Fixed compiler warnings
extra/replace.c:
  Fixed compiler warning on windows
extra/yassl/taocrypt/include/algebra.hpp:
  Fixed compiler warnings
heap/hp_write.c:
  Fixed compiler warnings
innobase/os/os0file.c:
  Fixed compiler warnings
libmysql/libmysql.c:
  Call my_end()/my_thread_end last.
  my_end() calls free_charsets(), which allowed me to move the call
myisam/myisampack.c:
  Fixed compiler warnings
myisammrg/myrg_rkey.c:
  Fixed compiler warnings
mysys/my_thr_init.c:
  More comments
  Don't assert if my_thread_end() is called twice (common case)
ndb/src/mgmapi/mgmapi.cpp:
  Fixed compiler warnings
ndb/src/ndbapi/Ndb.cpp:
  Fixed compiler warnings
ndb/src/ndbapi/NdbScanOperation.cpp:
  Fixed compiler warnings
ndb/src/ndbapi/NdbTransaction.cpp:
  Fixed compiler warnings
ndb/src/ndbapi/Ndblist.cpp:
  Fixed compiler warnings
server-tools/instance-manager/guardian.cc:
  Removed not used variable
server-tools/instance-manager/portability.h:
  Removed duplicated symbol
sql/gen_lex_hash.cc:
  Fixed compiler warning
sql/ha_archive.cc:
  Fixed compiler warnings
sql/ha_ndbcluster.cc:
  Fixed compiler warnings
sql/mysqld.cc:
  Fixed compiler warnings
sql/sql_cache.cc:
  Fixed compiler warnings
  Fixed DBUG_PRINT strings to be consistent with 5.1
sql/tztime.cc:
  Fixed compiler warnings
sql/uniques.cc:
  Fixed compiler warnings
parent 7191e775
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -2397,7 +2397,6 @@ print_table_data(MYSQL_RES *result)
      const char *buffer;
      uint data_length;
      uint field_max_length;
      bool right_justified;
      uint visible_length;
      uint extra_padding;

@@ -3446,7 +3445,6 @@ server_version_string(MYSQL *mysql)
  {
    char *bufp = buf;
    MYSQL_RES *result;
    MYSQL_ROW cur;

    bufp = strnmov(buf, mysql_get_server_info(mysql), sizeof buf);

+1 −1
Original line number Diff line number Diff line
@@ -1419,7 +1419,7 @@ static uint dump_routines_for_db(char *db)
            routine body of other routines that are not the creator of!
          */
          DBUG_PRINT("info",("length of body for %s row[2] '%s' is %d",
                             routine_name, row[2], strlen(row[2])));
                             routine_name, row[2], (int) strlen(row[2])));
          if (strlen(row[2]))
          {
            char *query_str= NULL;
+9 −8
Original line number Diff line number Diff line
@@ -946,8 +946,8 @@ int dyn_string_cmp(DYNAMIC_STRING* ds, const char *fname)
    die(NullS);
  if (!eval_result && (uint) stat_info.st_size != ds->length)
  {
    DBUG_PRINT("info",("Size differs:  result size: %u  file size: %llu",
		       ds->length, stat_info.st_size));
    DBUG_PRINT("info",("Size differs:  result size: %u  file size: %lu",
		       ds->length, (ulong) stat_info.st_size));
    DBUG_PRINT("info",("result: '%s'", ds->str));
    DBUG_RETURN(RESULT_LENGTH_MISMATCH);
  }
@@ -3130,14 +3130,15 @@ void do_connect(struct st_command *command)
    else if (!strncmp(con_options, "COMPRESS", 8))
      con_compress= 1;
    else
      die("Illegal option to connect: %.*s", end - con_options, con_options);
      die("Illegal option to connect: %.*s", 
          (int) (end - con_options), con_options);
    /* Process next option */
    con_options= end;
  }

  if (next_con == connections_end)
    die("Connection limit exhausted, you can have max %d connections",
        (sizeof(connections)/sizeof(struct st_connection)));
        (int) (sizeof(connections)/sizeof(struct st_connection)));

  if (find_connection_by_name(ds_connection_name.str))
    die("Connection %s already exists", ds_connection_name.str);
@@ -3458,10 +3459,10 @@ int read_line(char *buf, int size)
	DBUG_RETURN(0);
      }
      else if ((c == '{' &&
                (!my_strnncoll_simple(charset_info, "while", 5,
                                      buf, min(5, p - buf), 0) ||
                 !my_strnncoll_simple(charset_info, "if", 2,
                                      buf, min(2, p - buf), 0))))
                (!my_strnncoll_simple(charset_info, (const uchar*) "while", 5,
                                      (uchar*) buf, min(5, p - buf), 0) ||
                 !my_strnncoll_simple(charset_info, (const uchar*) "if", 2,
                                      (uchar*) buf, min(2, p - buf), 0))))
      {
        /* Only if and while commands can be terminated by { */
        *p++= c;
+3 −1
Original line number Diff line number Diff line
@@ -337,6 +337,7 @@ rl_generic_bind (type, keyseq, data, map)
  KEYMAP_ENTRY k;

  k.function = 0;
  k.type= 0;

  /* If no keys to bind to, exit right away. */
  if (!keyseq || !*keyseq)
@@ -735,7 +736,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 ((long long) file_size != (long long) finfo.st_size ||
      file_size + 1 < file_size)
    {
      if (file >= 0)
	close (file);
+2 −1
Original line number Diff line number Diff line
@@ -184,7 +184,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 ((long long) file_size != (long long) finfo.st_size ||
      file_size + 1 < file_size)
    {
      errno = overflow_errno;
      goto error_and_exit;
Loading