Commit 101ea232 authored by Michael Widenius's avatar Michael Widenius

Fixed warnings and errors discovered by pushbuild2

mysys/my_init.c:
  Fixed link error when compiling without thread support
sql/item_create.cc:
  Fixed compiler warning
sql/mysqld.cc:
  Fixed compile error on windows
sql/protocol.cc:
  Fixed compiler warning
sql/sql_class.cc:
  Fixed compiler warning
sql/sql_class.h:
  Fixed compiler warning
storage/myisam/mi_open.c:
  Fixed compiler warning
storage/myisammrg/ha_myisammrg.cc:
  Fixed compiler warning (shadow variable)
parent c4be4979
......@@ -199,7 +199,9 @@ Voluntary context switches %ld, Involuntary context switches %ld\n",
#endif
#if defined(SAFEMALLOC)
/* Wait for other threads to free mysys_var */
#ifdef THREAD
(void) my_wait_for_other_threads_to_die(1);
#endif
TERMINATE(stderr, (infoflag & MY_GIVE_INFO) != 0);
#elif defined(__WIN__) && defined(_MSC_VER)
_CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE );
......
......@@ -5118,7 +5118,7 @@ create_func_cast(THD *thd, Item *a, Cast_target cast_type,
CHARSET_INFO *real_cs= (cs ? cs : thd->variables.collation_connection);
if (c_len == NULL)
{
len= LL(-1);
len= (ulong) -1L;
}
else
{
......
......@@ -1809,7 +1809,7 @@ void close_connection(THD *thd, uint errcode, bool lock)
extern "C" sig_handler end_mysqld_signal(int sig __attribute__((unused)))
{
DBUG_ENTER("end_mysqld_signal");
kill(0, SIGTERM); // Take down mysqld nicely
kill_mysql(); // Take down mysqld nicely
DBUG_VOID_RETURN; /* purecov: deadcode */
}
......
......@@ -477,9 +477,10 @@ void Protocol::init(THD *thd_arg)
for the error.
*/
void Protocol::end_partial_result_set(THD *thd)
void Protocol::end_partial_result_set(THD *thd_arg)
{
net_send_eof(thd, thd->server_status, 0 /* no warnings, we're inside SP */);
net_send_eof(thd_arg, thd_arg->server_status,
0 /* no warnings, we're inside SP */);
}
......
......@@ -1512,7 +1512,7 @@ void THD::rollback_item_tree_changes()
select_result::select_result()
{
thd=current_thd;
nest_level= -1;
nest_level= (uint) -1;
}
void select_result::send_error(uint errcode,const char *err)
......
......@@ -2339,7 +2339,7 @@ class select_result :public Sql_alloc {
@return
-1 if nest level is undefined, otherwise a positive integer.
*/
int get_nest_level() { return nest_level; }
int get_nest_level() { return (int) nest_level; }
#ifdef EMBEDDED_LIBRARY
virtual void begin_dataset() {}
#else
......
......@@ -141,8 +141,8 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
(uchar*) myisam_file_magic, 4))
{
DBUG_PRINT("error",("Wrong header in %s",name_buff));
DBUG_DUMP("error_dump",(char*) share->state.header.file_version,
head_length);
DBUG_DUMP("error_dump", share->state.header.file_version,
(size_t) head_length);
my_errno=HA_ERR_NOT_A_TABLE;
goto err;
}
......
......@@ -404,14 +404,14 @@ static MI_INFO *myisammrg_attach_children_callback(void *callback_param)
*/
int ha_myisammrg::open(const char *name, int mode __attribute__((unused)),
uint test_if_locked)
uint test_if_locked_arg)
{
DBUG_ENTER("ha_myisammrg::open");
DBUG_PRINT("myrg", ("name: '%s' table: 0x%lx", name, (long) table));
DBUG_PRINT("myrg", ("test_if_locked: %u", test_if_locked));
DBUG_PRINT("myrg", ("test_if_locked: %u", test_if_locked_arg));
/* Save for later use. */
this->test_if_locked= test_if_locked;
test_if_locked= test_if_locked_arg;
/* retrieve children table list. */
my_errno= 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment