diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c
index f9898e263aa33e58f413cdfba8239eff56ea3ef6..3c11e6731b7f983e38afd72a5c4294733400b885 100644
--- a/mysys/mf_keycache.c
+++ b/mysys/mf_keycache.c
@@ -3113,7 +3113,7 @@ int key_cache_write(KEY_CACHE *keycache,
           /* Used in the server. */
           keycache->global_cache_write++;
           keycache_pthread_mutex_unlock(&keycache->cache_lock);
-          if (my_pwrite(file, (uchar*) buff, read_length, filepos + offset,
+          if (my_pwrite(file, (byte*) buff, read_length, filepos + offset,
                         MYF(MY_NABP | MY_WAIT_IF_FULL)))
             error=1;
           keycache_pthread_mutex_lock(&keycache->cache_lock);
diff --git a/sql/item_func.cc b/sql/item_func.cc
index c6dbdb1d9a763e20264e168ddfebec625b6161cd..d6f315fda5022655d032deb17e355ce794cfd4fc 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -4201,7 +4201,7 @@ void Item_func_set_user_var::save_item_result(Item *item)
 bool
 Item_func_set_user_var::update()
 {
-  bool res= NULL;
+  bool res= 0;
   DBUG_ENTER("Item_func_set_user_var::update");
 
   switch (cached_result_type) {