[PATCH 3/3] remote: conditionally declare tty variable for non-Win32 platforms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The 'tty' variable is only used on Win32. Instead of just annotating it
with ATTRIBUTE_UNUSED, make its declaration conditional on WIN32 so that
it is clear why it is not used.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 src/remote/remote_driver.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index aae1976008..acc6a87bb3 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -803,7 +803,9 @@ doRemoteOpen(virConnectPtr conn,
     VIR_AUTOFREE(char *) knownHosts = NULL;
     bool sanity = true;
     bool verify = true;
-    bool tty ATTRIBUTE_UNUSED = true;
+#ifndef WIN32
+    bool tty = true;
+#endif
 
     /* We handle *ALL* URIs here. The caller has rejected any
      * URIs we don't care about */
@@ -908,7 +910,9 @@ doRemoteOpen(virConnectPtr conn,
 
             EXTRACT_URI_ARG_BOOL("no_sanity", sanity);
             EXTRACT_URI_ARG_BOOL("no_verify", verify);
+#ifndef WIN32
             EXTRACT_URI_ARG_BOOL("no_tty", tty);
+#endif
 
             if (STRCASEEQ(var->name, "authfile")) {
                 /* Strip this param, used by virauth.c */
-- 
2.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux