Commit c1477a3f authored by unknown's avatar unknown
Browse files

Removed compiler warnings

Ensure that my_size_t is always unsigned (to get predictiable results from system to system)
Removed some %lld, as these are not portable


BUILD/FINISH.sh:
  Remove configure files from storage engines (as some of them may be old versions and may cause conflicts)
client/mysqldump.c:
  Removed compiler warning
client/mysqlslap.c:
  Removed compiler warning
client/mysqltest.c:
  Removed compiler warning
cmd-line-utils/readline/bind.c:
  Removed compiler warning
cmd-line-utils/readline/histfile.c:
  Removed compiler warning
include/my_global.h:
  Ensure that my_size_t is always unsigned (to get predictiable results from system to system)
  Moved my_offset_t here from parse_file.h
sql/event_data_objects.cc:
  Removed compiler warning
sql/event_scheduler.cc:
  Removed compiler warning
sql/field.h:
  Removed compiler warning
sql/ha_ndbcluster_binlog.cc:
  Removed compiler warning
sql/ha_partition.cc:
  Removed compiler warning
sql/item_strfunc.cc:
  Removed compiler warning
sql/log_event.cc:
  Removed compiler warning
sql/mysqld.cc:
  Removed compiler warning
sql/parse_file.h:
  Moved my_offset_t to my_global.h
sql/rpl_utility.cc:
  Removed compiler warning
sql/sql_binlog.cc:
  Removed compiler warning
sql/sql_cache.cc:
  Removed compiler warning
sql/tztime.cc:
  Removed compiler warning
storage/archive/ha_archive.cc:
  Removed compiler warning
  Removed %lld as it's not portable
storage/heap/hp_write.c:
  Removed compiler warning
storage/innobase/os/os0file.c:
  Removed compiler warning
storage/myisam/myisampack.c:
  Removed compiler warning
storage/myisammrg/myrg_rkey.c:
  Removed compiler warning
storage/ndb/include/kernel/signaldata/DictTabInfo.hpp:
  Use my_offsetof instead of offsetof to get rid of compiler warnings
storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp:
  Removed compiler warning
storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp:
  Removed compiler warning
  Note: Someone from NDB team should check this fix!
storage/ndb/src/kernel/vm/Rope.cpp:
  Removed compiler warning
storage/ndb/src/mgmapi/mgmapi.cpp:
  Removed compiler warning
storage/ndb/src/ndbapi/Ndb.cpp:
  Removed compiler warning
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp:
  Removed compiler warning
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
  Removed compiler warning
storage/ndb/src/ndbapi/NdbTransaction.cpp:
  Removed compiler warning
storage/ndb/src/ndbapi/Ndblist.cpp:
  Removed compiler warning
parent 24bbc92b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ configure="./configure $base_configs $extra_configs"

commands="\
$make -k distclean || true 
/bin/rm -rf */.deps/*.P config.cache storage/innobase/config.cache autom4te.cache innobase/autom4te.cache;
/bin/rm -rf */.deps/*.P configure config.cache storage/*/configure storage/*/config.cache autom4te.cache storage/*/autom4te.cache;

path=`dirname $0`
. \"$path/autorun.sh\""
+2 −2
Original line number Diff line number Diff line
@@ -1560,8 +1560,8 @@ static uint dump_routines_for_db(char *db)
            if the user has EXECUTE privilege he see routine names, but NOT the
            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])));
          DBUG_PRINT("info",("length of body for %s row[2] '%s' is %ld",
                             routine_name, row[2], (long) strlen(row[2])));
          if (strlen(row[2]))
          {
            char *query_str= NULL;
+1 −1
Original line number Diff line number Diff line
@@ -592,7 +592,7 @@ get_random_string(char *buf)
  DBUG_ENTER("get_random_string");
  for (x= RAND_STRING_SIZE; x > 0; x--)
    *buf_ptr++= ALPHANUMERICS[random() % ALPHANUMERICS_SIZE];
  DBUG_PRINT("info", ("random string: '%*s'", buf_ptr - buf, buf));
  DBUG_PRINT("info", ("random string: '%*s'", (int) (buf_ptr - buf), buf));
  DBUG_RETURN(buf_ptr - buf);
}

+5 −5
Original line number Diff line number Diff line
@@ -893,8 +893,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);
  }
@@ -3077,14 +3077,14 @@ 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)));
    die("Connection limit exhausted, you can have max %ld connections",
        (long) (sizeof(connections)/sizeof(struct st_connection)));

  if (find_connection_by_name(ds_connection_name.str))
    die("Connection %s already exists", ds_connection_name.str);
+2 −1
Original line number Diff line number Diff line
@@ -735,7 +735,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);
Loading