fix(cache): fix warnings (#5671)

This commit is contained in:
Michael Simon
2024-02-19 21:27:30 +01:00
committed by GitHub
parent cb61ba6ed1
commit f8f69215a5
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -168,13 +168,13 @@ static bool init_cnt_cb(lv_cache_t * cache)
/*add void* to store the ll node pointer*/
if(!lv_rb_init(&lru->rb, lru->cache.ops.compare_cb, lv_cache_entry_get_size(lru->cache.node_size) + sizeof(void *))) {
return NULL;
return false;
}
_lv_ll_init(&lru->ll, sizeof(void *));
lru->get_data_size_cb = cnt_get_data_size_cb;
return lru;
return true;
}
static bool init_size_cb(lv_cache_t * cache)
@@ -192,13 +192,13 @@ static bool init_size_cb(lv_cache_t * cache)
/*add void* to store the ll node pointer*/
if(!lv_rb_init(&lru->rb, lru->cache.ops.compare_cb, lv_cache_entry_get_size(lru->cache.node_size) + sizeof(void *))) {
return NULL;
return false;
}
_lv_ll_init(&lru->ll, sizeof(void *));
lru->get_data_size_cb = size_get_data_size_cb;
return lru;
return true;
}
static void destroy_cb(lv_cache_t * cache, void * user_data)
+1 -1
View File
@@ -243,7 +243,7 @@ bool lv_rb_drop(lv_rb_t * tree, const void * key)
{
LV_ASSERT_NULL(tree);
if(tree == NULL) {
return NULL;
return false;
}
void * data = lv_rb_remove(tree, key);