]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
remote: conditionally declare tty variable for non-Win32 platforms
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 4 Jul 2019 10:24:37 +0000 (11:24 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 5 Jul 2019 17:27:24 +0000 (18:27 +0100)
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.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/remote/remote_driver.c

index c66775021eaa920e0e6a3c08cf3050583491b3f3..925ada1cacf9497a6d66261225c638b4e432cc92 100644 (file)
@@ -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 */