From 5682fd249949bdbe4d7eeb5431736cf160fcd3a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?utf8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Sat, 25 Feb 2017 12:46:03 +0000 Subject: [PATCH] Shuffle some vars around to fix a warning On W32 the 'gc' variable is left unused. --- src/util/connection.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/util/connection.c b/src/util/connection.c index dfa673a86..e822b264f 100644 --- a/src/util/connection.c +++ b/src/util/connection.c @@ -335,12 +335,17 @@ GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck access_cb, struct sockaddr_in6 *v6; struct sockaddr *sa; void *uaddr; - struct GNUNET_CONNECTION_Credentials *gcp; - struct GNUNET_CONNECTION_Credentials gc; #ifdef SO_PEERCRED struct ucred uc; socklen_t olen; #endif + struct GNUNET_CONNECTION_Credentials *gcp; +#if HAVE_GETPEEREID || defined(SO_PEERCRED) || HAVE_GETPEERUCRED + struct GNUNET_CONNECTION_Credentials gc; + + gc.uid = 0; + gc.gid = 0; +#endif addrlen = sizeof (addr); sock = @@ -386,8 +391,6 @@ GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck access_cb, GNUNET_memcpy (uaddr, addr, addrlen); } gcp = NULL; - gc.uid = 0; - gc.gid = 0; if (AF_UNIX == sa->sa_family) { #if HAVE_GETPEEREID -- 2.25.1