Skip to content

Commit

Permalink
target-arm: Fix unreachable code in gicv3_class_name()
Browse files Browse the repository at this point in the history
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]>
Reviewed-by: Shannon Zhao <[email protected]>
Message-id: [email protected]
  • Loading branch information
pm215 committed Jul 19, 2016
1 parent 5d32173 commit ff9d3e9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions target-arm/machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit ff9d3e9

Please sign in to comment.