mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-23 15:56:59 +08:00
fix(cache): fix warnings (#5671)
This commit is contained in:
Vendored
+4
-4
@@ -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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user