mirror of
https://github.com/osmarks/ngircd.git
synced 2025-10-26 19:47:38 +00:00
Fix compiler warning in Option_String()
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.
This commit is contained in:
@@ -483,11 +483,8 @@ Help(CLIENT *Client, const char *Topic)
|
|||||||
* @return Pointer to static (global) string buffer.
|
* @return Pointer to static (global) string buffer.
|
||||||
*/
|
*/
|
||||||
static char *
|
static char *
|
||||||
#ifdef ZLIB
|
#if defined(SSL_SUPPORT) || defined(ZLIB)
|
||||||
Option_String(CONN_ID Idx)
|
Option_String(CONN_ID Idx)
|
||||||
#else
|
|
||||||
Option_String(UNUSED CONN_ID Idx)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
static char option_txt[8];
|
static char option_txt[8];
|
||||||
UINT16 options;
|
UINT16 options;
|
||||||
@@ -507,6 +504,11 @@ Option_String(UNUSED CONN_ID Idx)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
return option_txt;
|
return option_txt;
|
||||||
|
#else
|
||||||
|
Option_String(UNUSED CONN_ID Idx)
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
#endif
|
||||||
} /* Option_String */
|
} /* Option_String */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user