commit eb76464cdf0164ae68c53c6b017d261a715a93c5
parent e66aac06c0b814cb146293de7f1658c42bf4fd4f
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Sat, 24 Apr 2021 18:06:08 +0300
connection.c: muted compiler warning for builds without messages
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
@@ -125,6 +125,7 @@
*/
#define MHD_SENFILE_CHUNK_THR_P_C_ (0x200000)
+#ifdef HAVE_MESSAGES
/**
* Return text description for MHD_ERR_*_ codes
* @param mhd_err_code the error code
@@ -133,7 +134,6 @@
static const char *
str_conn_error_ (ssize_t mhd_err_code)
{
-#ifdef HAVE_MESSAGES
switch (mhd_err_code)
{
case MHD_ERR_AGAIN_:
@@ -162,12 +162,11 @@ str_conn_error_ (ssize_t mhd_err_code)
mhd_assert (0); /* Should never be reachable */
return _ ("Wrong error code value");
-#else /* ! HAVE_MESSAGES */
- return "";
-#endif /* ! HAVE_MESSAGES */
}
+#endif /* HAVE_MESSAGES */
+
/**
* Callback for receiving data from the socket.
*