qga: Replace an unreachable error by abort()
check_suspend_mode()'s error message Parameter 'mode' expects GuestSuspendMode makes no sense to users: GuestSuspendMode is a C enum. Fortunately, it is unreachable. Replace it by abort(). Cc: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20201113082626.2725812-8-armbru@redhat.com>
This commit is contained in:
parent
99750d82e4
commit
ac84b0fa28
@ -1441,8 +1441,7 @@ static void check_suspend_mode(GuestSuspendMode mode, Error **errp)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "mode",
|
||||
"GuestSuspendMode");
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user