diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-12-27 17:35:49 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-12-27 17:35:49 +0300 |
commit | f53db2892e5af9841b0b19e6a5fea96fb2f8ebf8 (patch) | |
tree | 5b002bee8fc3848a98a07cab86291aa1154930d0 | |
parent | b5315c24cc9e6df8bc46f69b065a0a9c976f9676 (diff) | |
download | libmicrohttpd-f53db2892e5af9841b0b19e6a5fea96fb2f8ebf8.tar.gz libmicrohttpd-f53db2892e5af9841b0b19e6a5fea96fb2f8ebf8.zip |
Muted compiler warnings
-rw-r--r-- | doc/examples/tlsauthentication.c | 2 | ||||
-rw-r--r-- | src/examples/websocket_threaded_example.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/examples/tlsauthentication.c b/doc/examples/tlsauthentication.c index ca8187bc..5b2dec1d 100644 --- a/doc/examples/tlsauthentication.c +++ b/doc/examples/tlsauthentication.c | |||
@@ -54,7 +54,7 @@ string_to_base64 (const char *message) | |||
54 | } | 54 | } |
55 | 55 | ||
56 | if (length % 3) | 56 | if (length % 3) |
57 | strncat (tmp, "===", 3 - length % 3); | 57 | strncat (tmp, "==", 3 - length % 3); |
58 | 58 | ||
59 | return tmp; | 59 | return tmp; |
60 | } | 60 | } |
diff --git a/src/examples/websocket_threaded_example.c b/src/examples/websocket_threaded_example.c index 1f4db5b8..4c767f0a 100644 --- a/src/examples/websocket_threaded_example.c +++ b/src/examples/websocket_threaded_example.c | |||
@@ -482,7 +482,7 @@ ws_get_accept_value (const char *key, char **val) | |||
482 | char *str; | 482 | char *str; |
483 | ssize_t len; | 483 | ssize_t len; |
484 | 484 | ||
485 | if (NULL == key) | 485 | if ( (NULL == key) || (WS_KEY_LEN != strlen (key))) |
486 | { | 486 | { |
487 | return MHD_NO; | 487 | return MHD_NO; |
488 | } | 488 | } |
@@ -535,7 +535,7 @@ send_all (MHD_socket sock, const unsigned char *buf, size_t len) | |||
535 | 535 | ||
536 | for (off = 0; off < len; off += ret) | 536 | for (off = 0; off < len; off += ret) |
537 | { | 537 | { |
538 | ret = send (sock, (const void*)&buf[off], len - off, 0); | 538 | ret = send (sock, (const void*) &buf[off], len - off, 0); |
539 | if (0 > ret) | 539 | if (0 > ret) |
540 | { | 540 | { |
541 | if (EAGAIN == errno) | 541 | if (EAGAIN == errno) |
@@ -711,7 +711,7 @@ run_usock (void *cls) | |||
711 | } | 711 | } |
712 | if (type == WS_OPCODE_TEXT_FRAME) | 712 | if (type == WS_OPCODE_TEXT_FRAME) |
713 | { | 713 | { |
714 | size = sprintf (client, "User#%d: ", (int)ws->sock); | 714 | size = sprintf (client, "User#%d: ", (int) ws->sock); |
715 | size += got; | 715 | size += got; |
716 | text = malloc (size); | 716 | text = malloc (size); |
717 | if (NULL != text) | 717 | if (NULL != text) |