[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 1/1] target/riscv/pmp: Add assert for ePMP operations
From: |
Bin Meng |
Subject: |
Re: [PATCH v1 1/1] target/riscv/pmp: Add assert for ePMP operations |
Date: |
Fri, 21 May 2021 10:17:42 +0800 |
On Fri, May 21, 2021 at 6:56 AM Alistair Francis
<alistair.francis@wdc.com> wrote:
>
> Although we construct epmp_operation in such a way that it can only be
> between 0 and 15 Coverity complains that we don't handle the other
> possible cases. To fix Coverity and make it easier for humans to read
> add a default case to the switch statement that calls
> g_assert_not_reached().
>
> Fixes: CID 1453108
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
> target/riscv/pmp.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>