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