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 <mdr...@linux.vnet.ibm.com>
Signed-off-by: Markus Armbruster <arm...@redhat.com>
---
 qga/commands-win32.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 300b87c859..87dc43e837 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -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();
     }
 }
 
-- 
2.26.2


Reply via email to