[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 02/05: daemon.c: muted some compiler warnin
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 02/05: daemon.c: muted some compiler warnings, added comments. |
Date: |
Thu, 28 Sep 2017 20:00:17 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 4e18379e5155429dcb944a856e0a1607c64d5c47
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Thu Sep 28 20:50:19 2017 +0300
daemon.c: muted some compiler warnings, added comments.
---
src/microhttpd/daemon.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index fb363caa..7d4daa73 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -130,6 +130,7 @@ mhd_panic_std (void *cls,
unsigned int line,
const char *reason)
{
+ (void)cls; /* Mute compiler warning. */
#ifdef HAVE_MESSAGES
fprintf (stderr,
_("Fatal error in GNU libmicrohttpd %s:%u: %s\n"),
@@ -4404,6 +4405,8 @@ unescape_wrapper (void *cls,
struct MHD_Connection *connection,
char *val)
{
+ (void)cls; /* Mute compiler warning. */
+ (void)connection; /* Mute compiler warning. */
return MHD_http_unescape (val);
}
@@ -4630,7 +4633,10 @@ parse_options_va (struct MHD_Daemon *daemon,
case MHD_OPTION_CONNECTION_TIMEOUT:
uv = va_arg (ap,
unsigned int);
- if (TIME_T_MAX < uv)
+ /* Next comparison could be always false on some platforms and whole
branch will
+ * be optimized out on those platforms. On others it will be
compiled into real
+ * check. */
+ if (TIME_T_MAX < uv) /* Compiler may warn on some platforms, ignore
warning. */
{
#ifdef HAVE_MESSAGES
MHD_DLOG (daemon,
@@ -4687,7 +4693,10 @@ parse_options_va (struct MHD_Daemon *daemon,
#endif
daemon->worker_pool_size = 0;
}
- else if (daemon->worker_pool_size >= (SIZE_MAX / sizeof (struct
MHD_Daemon)))
+ /* Next comparison could be always false on some platforms and whole
branch will
+ * be optimized out on those platforms. On others it will be
compiled into real
+ * check. */
+ else if (daemon->worker_pool_size >= (SIZE_MAX / sizeof (struct
MHD_Daemon))) /* Compiler may warn on some platforms, ignore warning. */
{
#ifdef HAVE_MESSAGES
MHD_DLOG (daemon,
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [libmicrohttpd] branch master updated (42e4a4b6 -> 27c939ad), gnunet, 2017/09/28
- [GNUnet-SVN] [libmicrohttpd] 05/05: mhd_str.c: muted compiler warning, gnunet, 2017/09/28
- [GNUnet-SVN] [libmicrohttpd] 01/05: connection.c: muted compiler warnings, replaced some unused checks with asserts., gnunet, 2017/09/28
- [GNUnet-SVN] [libmicrohttpd] 02/05: daemon.c: muted some compiler warnings, added comments.,
gnunet <=
- [GNUnet-SVN] [libmicrohttpd] 03/05: digestauth.c: muted compiler warning, gnunet, 2017/09/28
- [GNUnet-SVN] [libmicrohttpd] 04/05: postprocessor.c: fixed compiler warnings, gnunet, 2017/09/28