Commit 74ef1415 authored by joerg@mysql.com's avatar joerg@mysql.com

Some casts and simple fixes to fix compile errors in Visual 2005,

cleaned up some of the casts as a result of Mats' review.
(transferred from "2005/12/10 22:31:58-06:00 reggie@fedora.(none)"
and from "2006/01/03 22:37:24-06:00 reggie@fedora.(none)")
parent 535515ae
This diff is collapsed.
......@@ -1704,7 +1704,7 @@ class Table_map_log_event : public Log_event
~Table_map_log_event();
virtual Log_event_type get_type_code() { return TABLE_MAP_EVENT; }
virtual bool is_valid() const { return m_memory; /* we check malloc */ }
virtual bool is_valid() const { return m_memory != NULL; /* we check malloc */ }
virtual int get_data_size() { return m_data_size; }
#ifndef MYSQL_CLIENT
......
......@@ -2345,7 +2345,7 @@ my_size_t THD::pack_row(TABLE *table, MY_BITMAP const* cols, byte *row_data,
for (int i= 0 ; field ; i++, p_field++, field= *p_field)
{
if (bitmap_is_set(cols,i))
ptr= field->pack(ptr, field->ptr + offset);
ptr= (byte*)field->pack(ptr, field->ptr + offset);
}
/*
......@@ -2422,7 +2422,7 @@ int THD::binlog_update_row(TABLE* table, bool is_trans,
}
else
{
if (unlikely(!(row_data= my_multi_malloc(MYF(MY_WME),
if (unlikely(!(row_data= (byte*)my_multi_malloc(MYF(MY_WME),
&before_row, before_maxlen,
&after_row, after_maxlen,
NULL))))
......@@ -2445,7 +2445,7 @@ int THD::binlog_update_row(TABLE* table, bool is_trans,
if (!table->write_row_record)
{
/* add_row_data copies row_data to internal buffer */
my_free(row_data, MYF(MY_WME));
my_free((gptr)row_data, MYF(MY_WME));
}
return error;
......@@ -2464,7 +2464,7 @@ int THD::binlog_delete_row(TABLE* table, bool is_trans,
bool error= 0;
my_size_t const max_len= max_row_length(table, record);
byte *row_data= table->write_row_record;
if (!row_data && unlikely(!(row_data= my_malloc(max_len, MYF(MY_WME)))))
if (!row_data && unlikely(!(row_data= (byte*)my_malloc(max_len, MYF(MY_WME)))))
return HA_ERR_OUT_OF_MEM;
my_size_t const len= pack_row(table, cols, row_data, record);
......@@ -2477,7 +2477,7 @@ int THD::binlog_delete_row(TABLE* table, bool is_trans,
/* add_row_data copies row_data */
if (table->write_row_record == 0)
my_free(row_data, MYF(MY_WME));
my_free((gptr)row_data, MYF(MY_WME));
return error;
}
......
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