On 2/6/23 15:30, Kevin Brodsky wrote:
On 02/02/2023 10:26, Amit Daniel Kachhap wrote:
The morello Gcc toochain generates below warning which is fixed by adding "fallthrough" comment before the next case.
bootstrap.c:87:20: warning: this statement may fall through [-Wimplicit-fallthrough=] 87 | if ((void *)auxv->a_val == NULL)
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com
tools/testing/selftests/arm64/morello/bootstrap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/arm64/morello/bootstrap.c b/tools/testing/selftests/arm64/morello/bootstrap.c index 75c636688c5b..aeda042c2540 100644 --- a/tools/testing/selftests/arm64/morello/bootstrap.c +++ b/tools/testing/selftests/arm64/morello/bootstrap.c @@ -83,9 +83,10 @@ int verify_auxval(struct morello_auxv *auxv) case AT_CHERI_INTERP_RW_CAP: case AT_CHERI_INTERP_RX_CAP: case AT_BASE:
/* Fall through if not null, abi allows it */
/* If not null, abi allows it */
I think (but not 100% sure) that the comment originally meant that the ABI allows these entries to be null, I don't see what else it can mean now. I'd either reword the comment accordingly or remove it altogether, it's not essential.
Agree the comment is not clear enough. I will update it.
Thanks, Amit
Kevin
if ((void *)auxv->a_val == NULL) break;
case AT_ENTRY: case AT_EXECFN: case AT_PLATFORM:/* fallthrough */