Commit 769f0603 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix some warnings

parent a81ea753
......@@ -62,6 +62,7 @@ static int uncompress_zlib(String *to, const uchar *from, uint from_length,
z_stream stream;
uchar original_pack_length;
int wbits;
ulonglong avail_out;
original_pack_length= *from & 0x07;
wbits= *from & 8 ? -MAX_WBITS : MAX_WBITS;
......@@ -75,14 +76,15 @@ static int uncompress_zlib(String *to, const uchar *from, uint from_length,
return 1;
}
stream.avail_out= read_bigendian(from, original_pack_length);
avail_out= (ulonglong)read_bigendian(from, original_pack_length);
if (stream.avail_out > field_length)
if (avail_out > field_length)
{
my_error(ER_ZLIB_Z_DATA_ERROR, MYF(0));
return 1;
}
stream.avail_out= (uint)avail_out;
if (to->alloc(stream.avail_out))
return 1;
......
......@@ -1767,7 +1767,7 @@ public:
option.var_type|= GET_BIT;
reverse_semantics= my_count_bits(bitmask_arg) > 1;
bitmask= reverse_semantics ? ~bitmask_arg : bitmask_arg;
option.block_size= reverse_semantics ? -(long) bitmask : bitmask;
option.block_size= reverse_semantics ? -(long) bitmask : (long)bitmask;
set(global_var_ptr(), def_val);
SYSVAR_ASSERT(def_val < 2);
SYSVAR_ASSERT(size == sizeof(ulonglong));
......
......@@ -199,7 +199,7 @@ class MutexDebug {
bool is_owned() const UNIV_NOTHROW
{
return(os_thread_eq(
my_atomic_loadlint(&m_context.m_thread_id),
(os_thread_id_t)my_atomic_loadlint(&m_context.m_thread_id),
os_thread_get_curr_id()));
}
......@@ -221,7 +221,7 @@ class MutexDebug {
os_thread_id_t get_thread_id() const
UNIV_NOTHROW
{
return(my_atomic_loadlint(&m_context.m_thread_id));
return((os_thread_id_t)my_atomic_loadlint(&m_context.m_thread_id));
}
/** Magic number to check for memory corruption. */
......
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