arch: x86: x86_mmu: Remove possible dead code
When __ASSERT is not enabled there is an attribution to the variable total_partitions and it is never used. MISRA-C rule 2.2 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
1492df3415
commit
34b12d8f16
1 changed files with 1 additions and 3 deletions
|
@ -284,15 +284,13 @@ void _arch_mem_domain_destroy(struct k_mem_domain *domain)
|
|||
void _arch_mem_domain_partition_remove(struct k_mem_domain *domain,
|
||||
u32_t partition_id)
|
||||
{
|
||||
u32_t total_partitions;
|
||||
struct k_mem_partition partition;
|
||||
|
||||
if (domain == NULL) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
total_partitions = domain->num_partitions;
|
||||
__ASSERT(partition_id <= total_partitions,
|
||||
__ASSERT(partition_id <= domain->num_partitions,
|
||||
"invalid partitions");
|
||||
|
||||
partition = domain->partitions[partition_id];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue