diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-08-18 11:30:17 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-08-18 11:30:17 +0200 |
commit | b4afd3fce6bd3bb8470385ca153e7a520c9ace0a (patch) | |
tree | a35c562bd5b61d2b16a41f0e471d0bdf0ed5f87d | |
parent | 439c14ab00572618669686a339bb88d81256e19b (diff) | |
download | libmicrohttpd-b4afd3fce6bd3bb8470385ca153e7a520c9ace0a.tar.gz libmicrohttpd-b4afd3fce6bd3bb8470385ca153e7a520c9ace0a.zip |
fix a few more compiler warnings
-rw-r--r-- | src/microhttpd/daemon.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index c70a405a..cd7f91c7 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -2164,8 +2164,8 @@ psk_gnutls_adapter (gnutls_session_t session, | |||
2164 | if (NULL == connection) | 2164 | if (NULL == connection) |
2165 | { | 2165 | { |
2166 | #ifdef HAVE_MESSAGES | 2166 | #ifdef HAVE_MESSAGES |
2167 | MHD_DLOG (daemon, | 2167 | /* Cannot use our logger, we don't even have "daemon" */ |
2168 | _("Internal server error. This should be impossible.\n")); | 2168 | MHD_PANIC (_("Internal server error. This should be impossible.\n")); |
2169 | #endif | 2169 | #endif |
2170 | return -1; | 2170 | return -1; |
2171 | } | 2171 | } |
@@ -3274,10 +3274,11 @@ MHD_get_timeout (struct MHD_Daemon *daemon, | |||
3274 | else | 3274 | else |
3275 | { | 3275 | { |
3276 | const time_t second_left = earliest_deadline - now; | 3276 | const time_t second_left = earliest_deadline - now; |
3277 | if (second_left > ULLONG_MAX / 1000) /* Ignore compiler warning: 'second_left' is always positive. */ | 3277 | |
3278 | if (((unsigned long long)second_left) > ULLONG_MAX / 1000) | ||
3278 | *timeout = ULLONG_MAX; | 3279 | *timeout = ULLONG_MAX; |
3279 | else | 3280 | else |
3280 | *timeout = 1000LL * second_left; | 3281 | *timeout = 1000LLU * (unsigned long long) second_left; |
3281 | } | 3282 | } |
3282 | return MHD_YES; | 3283 | return MHD_YES; |
3283 | } | 3284 | } |