[clang] fix a few warnings
Mostly dealing with comparing a pointer variable that is declared nonnull, which I find to be a dubious warning but is pretty safe in this case since the compiler will be more aggressive about the nullness of the arguments.
This commit is contained in:
@@ -34,7 +34,7 @@ static mutex_t lock = MUTEX_INITIAL_VALUE(lock);
|
||||
#define ADDRESS_IN_ARENA(address, arena) \
|
||||
((address) >= (arena)->base && (address) <= (arena)->base + (arena)->size - 1)
|
||||
|
||||
struct list_node *get_arena_list() { return &arena_list; }
|
||||
struct list_node *get_arena_list(void) { return &arena_list; }
|
||||
|
||||
static inline bool page_is_free(const vm_page_t *page) {
|
||||
return !(page->flags & VM_PAGE_FLAG_NONFREE);
|
||||
|
||||
@@ -298,8 +298,6 @@ status_t vmm_reserve_space(vmm_aspace_t *aspace, const char *name, size_t size,
|
||||
if (!name)
|
||||
name = "";
|
||||
|
||||
if (!aspace)
|
||||
return ERR_INVALID_ARGS;
|
||||
if (size == 0)
|
||||
return NO_ERROR;
|
||||
if (!IS_PAGE_ALIGNED(vaddr) || !IS_PAGE_ALIGNED(size))
|
||||
@@ -339,8 +337,6 @@ status_t vmm_alloc_physical(vmm_aspace_t *aspace, const char *name, size_t size,
|
||||
if (!name)
|
||||
name = "";
|
||||
|
||||
if (!aspace)
|
||||
return ERR_INVALID_ARGS;
|
||||
if (size == 0)
|
||||
return NO_ERROR;
|
||||
if (!IS_PAGE_ALIGNED(paddr) || !IS_PAGE_ALIGNED(size))
|
||||
|
||||
Reference in New Issue
Block a user