From: Daniel P. Berrange Date: Thu, 21 Jun 2012 13:46:03 +0000 (+0100) Subject: Fix unused parameters / functions in virsh on Win32 X-Git-Tag: v0.9.13-rc1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b9ca940256c8a8583f058a0604159958e172241;p=thirdparty%2Flibvirt.git Fix unused parameters / functions in virsh on Win32 The vshPrintRaw function is not used on Win32, and neither is the 'msg' parameter of vshAskReedit. Change the nesting of #ifdef WIN32 conditionals to address this Signed-off-by: Daniel P. Berrange --- diff --git a/tools/virsh.c b/tools/virsh.c index 75147efd62..567a5f6a08 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -649,6 +649,7 @@ vshReconnect(vshControl *ctl) ctl->useSnapshotOld = false; } +#ifndef WIN32 static void vshPrintRaw(vshControl *ctl, ...) { @@ -678,7 +679,6 @@ vshPrintRaw(vshControl *ctl, ...) static int vshAskReedit(vshControl *ctl, const char *msg) { -#ifndef WIN32 int c = -1; struct termios ttyattr; @@ -714,12 +714,16 @@ vshAskReedit(vshControl *ctl, const char *msg) vshPrint(ctl, "\r\n"); return c; -#else +} +#else /* WIN32 */ +static int +vshAskReedit(vshControl *ctl, const char *msg ATTRIBUTE_UNUSED) +{ vshDebug(ctl, VSH_ERR_WARNING, "%s", _("This function is not " "supported on WIN32 platform")); return 0; -#endif } +#endif /* WIN32 */ /* --------------- * Commands