aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-04-10 07:46:35 +0000
committerChristian Grothoff <christian@grothoff.org>2014-04-10 07:46:35 +0000
commit17b849eb47fa86305c14926c0bdc72c84fbb2e6f (patch)
treec9717484435b31044f80ccb75a3ac01a0df8a502
parent14ca1719e9a94a68853fc21e197c04ca4cab5ea8 (diff)
downloadlibmicrohttpd-17b849eb47fa86305c14926c0bdc72c84fbb2e6f.tar.gz
libmicrohttpd-17b849eb47fa86305c14926c0bdc72c84fbb2e6f.zip
-eliminate warnings
-rw-r--r--src/microhttpd/connection.c22
-rw-r--r--src/microhttpd/response.c14
2 files changed, 18 insertions, 18 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index b95c722c..ca7a57ca 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -365,7 +365,7 @@ try_ready_normal_body (struct MHD_Connection *connection)
365 /* either error or http 1.0 transfer, close socket! */ 365 /* either error or http 1.0 transfer, close socket! */
366 response->total_size = connection->response_write_position; 366 response->total_size = connection->response_write_position;
367 if (NULL != response->crc) 367 if (NULL != response->crc)
368 MHD_mutex_unlock_ (&response->mutex); 368 (void) MHD_mutex_unlock_ (&response->mutex);
369 if ( ((ssize_t)MHD_CONTENT_READER_END_OF_STREAM) == ret) 369 if ( ((ssize_t)MHD_CONTENT_READER_END_OF_STREAM) == ret)
370 MHD_connection_close (connection, MHD_REQUEST_TERMINATED_COMPLETED_OK); 370 MHD_connection_close (connection, MHD_REQUEST_TERMINATED_COMPLETED_OK);
371 else 371 else
@@ -379,7 +379,7 @@ try_ready_normal_body (struct MHD_Connection *connection)
379 { 379 {
380 connection->state = MHD_CONNECTION_NORMAL_BODY_UNREADY; 380 connection->state = MHD_CONNECTION_NORMAL_BODY_UNREADY;
381 if (NULL != response->crc) 381 if (NULL != response->crc)
382 MHD_mutex_unlock_ (&response->mutex); 382 (void) MHD_mutex_unlock_ (&response->mutex);
383 return MHD_NO; 383 return MHD_NO;
384 } 384 }
385 return MHD_YES; 385 return MHD_YES;
@@ -2090,7 +2090,7 @@ MHD_connection_handle_write (struct MHD_Connection *connection)
2090 case MHD_CONNECTION_NORMAL_BODY_READY: 2090 case MHD_CONNECTION_NORMAL_BODY_READY:
2091 response = connection->response; 2091 response = connection->response;
2092 if (NULL != response->crc) 2092 if (NULL != response->crc)
2093 MHD_mutex_lock_ (&response->mutex); 2093 (void) MHD_mutex_lock_ (&response->mutex);
2094 if (MHD_YES != try_ready_normal_body (connection)) 2094 if (MHD_YES != try_ready_normal_body (connection))
2095 break; 2095 break;
2096 ret = connection->send_cls (connection, 2096 ret = connection->send_cls (connection,
@@ -2110,7 +2110,7 @@ MHD_connection_handle_write (struct MHD_Connection *connection)
2110 response->data_start]); 2110 response->data_start]);
2111#endif 2111#endif
2112 if (NULL != response->crc) 2112 if (NULL != response->crc)
2113 MHD_mutex_unlock_ (&response->mutex); 2113 (void) MHD_mutex_unlock_ (&response->mutex);
2114 if (ret < 0) 2114 if (ret < 0)
2115 { 2115 {
2116 if ((err == EINTR) || (err == EAGAIN) || (EWOULDBLOCK == err)) 2116 if ((err == EINTR) || (err == EAGAIN) || (EWOULDBLOCK == err))
@@ -2461,18 +2461,18 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
2461 break; 2461 break;
2462 case MHD_CONNECTION_NORMAL_BODY_UNREADY: 2462 case MHD_CONNECTION_NORMAL_BODY_UNREADY:
2463 if (NULL != connection->response->crc) 2463 if (NULL != connection->response->crc)
2464 MHD_mutex_lock_ (&connection->response->mutex); 2464 (void) MHD_mutex_lock_ (&connection->response->mutex);
2465 if (0 == connection->response->total_size) 2465 if (0 == connection->response->total_size)
2466 { 2466 {
2467 if (NULL != connection->response->crc) 2467 if (NULL != connection->response->crc)
2468 MHD_mutex_unlock_ (&connection->response->mutex); 2468 (void) MHD_mutex_unlock_ (&connection->response->mutex);
2469 connection->state = MHD_CONNECTION_BODY_SENT; 2469 connection->state = MHD_CONNECTION_BODY_SENT;
2470 continue; 2470 continue;
2471 } 2471 }
2472 if (MHD_YES == try_ready_normal_body (connection)) 2472 if (MHD_YES == try_ready_normal_body (connection))
2473 { 2473 {
2474 if (NULL != connection->response->crc) 2474 if (NULL != connection->response->crc)
2475 MHD_mutex_unlock_ (&connection->response->mutex); 2475 (void) MHD_mutex_unlock_ (&connection->response->mutex);
2476 connection->state = MHD_CONNECTION_NORMAL_BODY_READY; 2476 connection->state = MHD_CONNECTION_NORMAL_BODY_READY;
2477 break; 2477 break;
2478 } 2478 }
@@ -2483,23 +2483,23 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
2483 break; 2483 break;
2484 case MHD_CONNECTION_CHUNKED_BODY_UNREADY: 2484 case MHD_CONNECTION_CHUNKED_BODY_UNREADY:
2485 if (NULL != connection->response->crc) 2485 if (NULL != connection->response->crc)
2486 MHD_mutex_lock_ (&connection->response->mutex); 2486 (void) MHD_mutex_lock_ (&connection->response->mutex);
2487 if (0 == connection->response->total_size) 2487 if (0 == connection->response->total_size)
2488 { 2488 {
2489 if (NULL != connection->response->crc) 2489 if (NULL != connection->response->crc)
2490 MHD_mutex_unlock_ (&connection->response->mutex); 2490 (void) MHD_mutex_unlock_ (&connection->response->mutex);
2491 connection->state = MHD_CONNECTION_BODY_SENT; 2491 connection->state = MHD_CONNECTION_BODY_SENT;
2492 continue; 2492 continue;
2493 } 2493 }
2494 if (MHD_YES == try_ready_chunked_body (connection)) 2494 if (MHD_YES == try_ready_chunked_body (connection))
2495 { 2495 {
2496 if (NULL != connection->response->crc) 2496 if (NULL != connection->response->crc)
2497 MHD_mutex_unlock_ (&connection->response->mutex); 2497 (void) MHD_mutex_unlock_ (&connection->response->mutex);
2498 connection->state = MHD_CONNECTION_CHUNKED_BODY_READY; 2498 connection->state = MHD_CONNECTION_CHUNKED_BODY_READY;
2499 continue; 2499 continue;
2500 } 2500 }
2501 if (NULL != connection->response->crc) 2501 if (NULL != connection->response->crc)
2502 MHD_mutex_unlock_ (&connection->response->mutex); 2502 (void) MHD_mutex_unlock_ (&connection->response->mutex);
2503 break; 2503 break;
2504 case MHD_CONNECTION_BODY_SENT: 2504 case MHD_CONNECTION_BODY_SENT:
2505 build_header_response (connection); 2505 build_header_response (connection);
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index ad05c5fb..b287a222 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -397,7 +397,7 @@ MHD_create_response_from_data (size_t size,
397 { 397 {
398 if (NULL == (tmp = malloc (size))) 398 if (NULL == (tmp = malloc (size)))
399 { 399 {
400 MHD_mutex_destroy_ (&response->mutex); 400 (void) MHD_mutex_destroy_ (&response->mutex);
401 free (response); 401 free (response);
402 return NULL; 402 return NULL;
403 } 403 }
@@ -454,14 +454,14 @@ MHD_destroy_response (struct MHD_Response *response)
454 454
455 if (NULL == response) 455 if (NULL == response)
456 return; 456 return;
457 MHD_mutex_lock_ (&response->mutex); 457 (void) MHD_mutex_lock_ (&response->mutex);
458 if (0 != --(response->reference_count)) 458 if (0 != --(response->reference_count))
459 { 459 {
460 MHD_mutex_unlock_ (&response->mutex); 460 (void) MHD_mutex_unlock_ (&response->mutex);
461 return; 461 return;
462 } 462 }
463 MHD_mutex_unlock_ (&response->mutex); 463 (void) MHD_mutex_unlock_ (&response->mutex);
464 MHD_mutex_destroy_ (&response->mutex); 464 (void) MHD_mutex_destroy_ (&response->mutex);
465 if (response->crfc != NULL) 465 if (response->crfc != NULL)
466 response->crfc (response->crc_cls); 466 response->crfc (response->crc_cls);
467 while (NULL != response->first_header) 467 while (NULL != response->first_header)
@@ -479,9 +479,9 @@ MHD_destroy_response (struct MHD_Response *response)
479void 479void
480MHD_increment_response_rc (struct MHD_Response *response) 480MHD_increment_response_rc (struct MHD_Response *response)
481{ 481{
482 MHD_mutex_lock_ (&response->mutex); 482 (void) MHD_mutex_lock_ (&response->mutex);
483 (response->reference_count)++; 483 (response->reference_count)++;
484 MHD_mutex_unlock_ (&response->mutex); 484 (void) MHD_mutex_unlock_ (&response->mutex);
485} 485}
486 486
487 487