[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] patch for libevent-2.1.8 to get past errors about void functions doing "return"
I can only assume that gcc ignores these.
Regardless :
*** ./http-internal.h_backup Tue Nov 1 15:34:53 2016
--- ./http-internal.h Mon Jun 18 15:16:32 2018
***************
*** 182,193 ****
/* connects if necessary */
int evhttp_connection_connect_(struct evhttp_connection *);
! enum evhttp_request_error;
/* notifies the current request that it failed; resets connection */
void evhttp_connection_fail_(struct evhttp_connection *,
enum evhttp_request_error error);
! enum message_read_status;
enum message_read_status evhttp_parse_firstline_(struct
evhttp_request *, struct evbuffer*);
enum message_read_status evhttp_parse_headers_(struct evhttp_request
*, struct evbuffer*);
--- 182,193 ----
/* connects if necessary */
int evhttp_connection_connect_(struct evhttp_connection *);
! enum evhttp_request_error; /* warning: useless declaration */
/* notifies the current request that it failed; resets connection */
void evhttp_connection_fail_(struct evhttp_connection *,
enum evhttp_request_error error);
! enum message_read_status; /* warning: useless declaration */
enum message_read_status evhttp_parse_firstline_(struct
evhttp_request *, struct evbuffer*);
enum message_read_status evhttp_parse_headers_(struct evhttp_request
*, struct evbuffer*);
*** ./test/regress_dns.c_backup Sun Jan 22 15:26:24 2017
--- ./test/regress_dns.c Mon Jun 18 15:13:56 2018
***************
*** 615,626 ****
static void
dns_search_test(void *arg)
{
! return dns_search_test_impl(arg, 0);
}
static void
dns_search_lower_test(void *arg)
{
! return dns_search_test_impl(arg, 1);
}
static int request_count = 0;
--- 615,626 ----
static void
dns_search_test(void *arg)
{
! dns_search_test_impl(arg, 0);
}
static void
dns_search_lower_test(void *arg)
{
! dns_search_test_impl(arg, 1);
}
static int request_count = 0;
*** ./test/regress_http.c_backup Sun Jan 22 15:26:24 2017
--- ./test/regress_http.c Mon Jun 18 15:19:35 2018
***************
*** 546,552 ****
bufferevent_free(bev);
}
static void http_basic_test(void *arg)
! { return http_basic_test_impl(arg, 0); }
static void
--- 546,552 ----
bufferevent_free(bev);
}
static void http_basic_test(void *arg)
! { http_basic_test_impl(arg, 0); }
static void
***************
*** 3327,3333 ****
evhttp_free(http);
}
static void http_chunk_out_test(void *arg)
! { return http_chunk_out_test_impl(arg, 0); }
static void
http_stream_out_test_impl(void *arg, int ssl)
--- 3327,3333 ----
evhttp_free(http);
}
static void http_chunk_out_test(void *arg)
! { http_chunk_out_test_impl(arg, 0); }
static void
http_stream_out_test_impl(void *arg, int ssl)
***************
*** 3373,3379 ****
evhttp_free(http);
}
static void http_stream_out_test(void *arg)
! { return http_stream_out_test_impl(arg, 0); }
static void
http_stream_in_chunk(struct evhttp_request *req, void *arg)
--- 3373,3379 ----
evhttp_free(http);
}
static void http_stream_out_test(void *arg)
! { http_stream_out_test_impl(arg, 0); }
static void
http_stream_in_chunk(struct evhttp_request *req, void *arg)
***************
*** 3569,3575 ****
;
}
static void http_connection_fail_test(void *arg)
! { return http_connection_fail_test_impl(arg, 0); }
static void
http_connection_retry_done(struct evhttp_request *req, void *arg)
--- 3569,3575 ----
;
}
static void http_connection_fail_test(void *arg)
! { http_connection_fail_test_impl(arg, 0); }
static void
http_connection_retry_done(struct evhttp_request *req, void *arg)
***************
*** 3641,3647 ****
evhttp_free(http);
}
static void http_simple_test(void *arg)
! { return http_simple_test_impl(arg, 0, 0); }
static void
http_connection_retry_test_basic(void *arg, const char *addr, struct
evdns_base *dns_base, int ssl)
--- 3641,3647 ----
evhttp_free(http);
}
static void http_simple_test(void *arg)
! { http_simple_test_impl(arg, 0, 0); }
static void
http_connection_retry_test_basic(void *arg, const char *addr, struct
evdns_base *dns_base, int ssl)
***************
*** 3798,3813 ****
/** dnsserver will be cleaned in
http_connection_retry_test_basic() */
}
static void http_connection_retry_conn_address_test(void *arg)
! { return http_connection_retry_conn_address_test_impl(arg, 0); }
static void
http_connection_retry_test_impl(void *arg, int ssl)
! {
! return http_connection_retry_test_basic(arg, "127.0.0.1", NULL,
ssl);
! }
static void
http_connection_retry_test(void *arg)
! { return http_connection_retry_test_impl(arg, 0); }
static void
http_primitives(void *ptr)
--- 3798,3812 ----
/** dnsserver will be cleaned in
http_connection_retry_test_basic() */
}
static void http_connection_retry_conn_address_test(void *arg)
! { http_connection_retry_conn_address_test_impl(arg, 0); }
static void
http_connection_retry_test_impl(void *arg, int ssl)
! { http_connection_retry_test_basic(arg, "127.0.0.1", NULL, ssl); }
!
static void
http_connection_retry_test(void *arg)
! { http_connection_retry_test_impl(arg, 0); }
static void
http_primitives(void *ptr)
***************
*** 4474,4480 ****
evhttp_free(http);
}
static void http_write_during_read_test(void *arg)
! { return http_write_during_read_test_impl(arg, 0); }
static void
http_request_own_test(void *arg)
--- 4473,4479 ----
evhttp_free(http);
}
static void http_write_during_read_test(void *arg)
! { http_write_during_read_test_impl(arg, 0); }
static void
http_request_own_test(void *arg)
***************
*** 4526,4560 ****
#ifdef EVENT__HAVE_OPENSSL
static void https_basic_test(void *arg)
! { return http_basic_test_impl(arg, 1); }
static void https_filter_basic_test(void *arg)
! { return http_basic_test_impl(arg, 1 | HTTP_SSL_FILTER); }
static void https_incomplete_test(void *arg)
{ http_incomplete_test_(arg, 0, 1); }
static void https_incomplete_timeout_test(void *arg)
{ http_incomplete_test_(arg, 1, 1); }
static void https_simple_test(void *arg)
! { return http_simple_test_impl(arg, 1, 0); }
static void https_simple_dirty_test(void *arg)
! { return http_simple_test_impl(arg, 1, 1); }
static void https_connection_retry_conn_address_test(void *arg)
! { return http_connection_retry_conn_address_test_impl(arg, 1); }
static void https_connection_retry_test(void *arg)
! { return http_connection_retry_test_impl(arg, 1); }
static void https_chunk_out_test(void *arg)
! { return http_chunk_out_test_impl(arg, 1); }
static void https_filter_chunk_out_test(void *arg)
! { return http_chunk_out_test_impl(arg, 1 | HTTP_SSL_FILTER); }
static void https_stream_out_test(void *arg)
! { return http_stream_out_test_impl(arg, 1); }
static void https_connection_fail_test(void *arg)
! { return http_connection_fail_test_impl(arg, 1); }
static void https_write_during_read_test(void *arg)
! { return http_write_during_read_test_impl(arg, 1); }
static void https_connection_test(void *arg)
! { return http_connection_test_(arg, 0, "127.0.0.1", NULL, 0,
AF_UNSPEC, 1); }
static void https_persist_connection_test(void *arg)
! { return http_connection_test_(arg, 1, "127.0.0.1", NULL, 0,
AF_UNSPEC, 1); }
#endif
struct testcase_t http_testcases[] = {
--- 4525,4559 ----
#ifdef EVENT__HAVE_OPENSSL
static void https_basic_test(void *arg)
! { http_basic_test_impl(arg, 1); }
static void https_filter_basic_test(void *arg)
! { http_basic_test_impl(arg, 1 | HTTP_SSL_FILTER); }
static void https_incomplete_test(void *arg)
{ http_incomplete_test_(arg, 0, 1); }
static void https_incomplete_timeout_test(void *arg)
{ http_incomplete_test_(arg, 1, 1); }
static void https_simple_test(void *arg)
! { http_simple_test_impl(arg, 1, 0); }
static void https_simple_dirty_test(void *arg)
! { http_simple_test_impl(arg, 1, 1); }
static void https_connection_retry_conn_address_test(void *arg)
! { http_connection_retry_conn_address_test_impl(arg, 1); }
static void https_connection_retry_test(void *arg)
! { http_connection_retry_test_impl(arg, 1); }
static void https_chunk_out_test(void *arg)
! { http_chunk_out_test_impl(arg, 1); }
static void https_filter_chunk_out_test(void *arg)
! { http_chunk_out_test_impl(arg, 1 | HTTP_SSL_FILTER); }
static void https_stream_out_test(void *arg)
! { http_stream_out_test_impl(arg, 1); }
static void https_connection_fail_test(void *arg)
! { http_connection_fail_test_impl(arg, 1); }
static void https_write_during_read_test(void *arg)
! { http_write_during_read_test_impl(arg, 1); }
static void https_connection_test(void *arg)
! { http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_UNSPEC, 1); }
static void https_persist_connection_test(void *arg)
! { http_connection_test_(arg, 1, "127.0.0.1", NULL, 0, AF_UNSPEC, 1); }
#endif
struct testcase_t http_testcases[] = {
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.