From 0706c03f9dec5cb5cbdbd0ef66156eb3fcd8bd33 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 14 Feb 2024 14:37:05 +0100 Subject: [PATCH] os: fix unused variable on WIN32 build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ../os/access.c:443:18: warning: unused variable ‘n’ [-Wunused-variable] 420 443 | register int n; 421 | ^ 422 [120/383] Compiling C object os/liblibxserver_os.a.p/connection.c.obj 431../os/connection.c:137:14: warning: ‘ParentProcess’ defined but not used [-Wunused-variable] 432 137 | static Pid_t ParentProcess; 433 | ^~~~~~~~~~~~~ ../os/connection.c:132:13: warning: ‘RunFromSmartParent’ defined but not used [-Wunused-variable] 435 132 | static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */ 436 | ^~~~~~~~~~~~~~~~~~ Part-of: --- os/access.c | 1 - os/connection.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/os/access.c b/os/access.c index 4c7151d06..6b3cad4ca 100644 --- a/os/access.c +++ b/os/access.c @@ -442,7 +442,6 @@ DefineSelf(int fd) #if !defined(TCPCONN) && !defined(UNIXCONN) return; #else - register int n; int len; caddr_t addr; int family; diff --git a/os/connection.c b/os/connection.c index d957ad661..f7e10b3ba 100644 --- a/os/connection.c +++ b/os/connection.c @@ -124,12 +124,14 @@ struct ospoll *server_poll; Bool NewOutputPending; /* not yet attempted to write some new output */ Bool NoListenAll; /* Don't establish any listening sockets */ -static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */ Bool RunFromSigStopParent; /* send SIGSTOP to our own process; Upstart (or equivalent) will send SIGCONT back. */ static char dynamic_display[7]; /* display name */ Bool PartialNetwork; /* continue even if unable to bind all addrs */ +#if !defined(WIN32) static Pid_t ParentProcess; +static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */ +#endif int GrabInProgress = 0;