target-arm: Fix unreachable code in gicv3_class_name()
PATCH 1/1 target-arm: Fix unreachable code in gicv3_class_name()
Coverity complains that the exit() in gicv3_class_name() can be unreachable, because if TARGET_AARCH64 is defined then all code paths return before reaching it. Move the exit() up to the error_report() that it belongs with.
Signed-off-by Peter Maydell <[email protected]>
--- target-arm/machine.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
target-arm/machine.c +1 -2
@@ -340,10 +340,9 @@ const char *gicv3_class_name(void)#else error_report ("KVM GICv3 acceleration is not supported on this " "platform" ); +exit (1 );#endif }else {return "arm-gicv3" ; } - -exit (1 ); }
Signature · 1 line
1.9.1
Quoted 6 lines · Peter Maydell
Coverity complains that the
exit()ingicv3_class_name()can be unreachable, because ifTARGET_AARCH64is defined then all code paths return before reaching it. Move theexit()up to theerror_report()that it belongs with.Signed-off-by Peter Maydell <[email protected]>
Reviewed-by Shannon Zhao <[email protected]>
Quoted 21 lines
--- target-arm/machine.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)target-arm/machine.c +1
-2@@ -340,10 +340,9 @@ const char *gicv3_class_name(void)#else error_report ("KVM GICv3 acceleration is not supported on this " "platform" ); +exit (1 );#endif }else {return "arm-gicv3" ; } - -exit (1 ); }
Signature · 1 line
Shannon