From d9f81ac66942000861d46cd33708585a729b1207 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Mon, 29 Jan 2018 23:32:06 +0100 Subject: [PATCH] Fix compiler warning in Option_String() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When compiling ngIRCd without support for SSL and without support for ZLIB, gcc outputs the following warning: irc.c:493:9: warning: variable ‘options’ set but not used [-Wunused-but-set-variable] Fix it by providing a dummy function in this case. --- src/ngircd/irc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ngircd/irc.c b/src/ngircd/irc.c index 7acd84ee..dc3b2f2e 100644 --- a/src/ngircd/irc.c +++ b/src/ngircd/irc.c @@ -483,11 +483,8 @@ Help(CLIENT *Client, const char *Topic) * @return Pointer to static (global) string buffer. */ static char * -#ifdef ZLIB +#if defined(SSL_SUPPORT) || defined(ZLIB) Option_String(CONN_ID Idx) -#else -Option_String(UNUSED CONN_ID Idx) -#endif { static char option_txt[8]; UINT16 options; @@ -507,6 +504,11 @@ Option_String(UNUSED CONN_ID Idx) #endif return option_txt; +#else +Option_String(UNUSED CONN_ID Idx) +{ + return ""; +#endif } /* Option_String */ /** -- 2.39.2