aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/grpc/grpc.h6
-rw-r--r--include/grpc/support/slice.h2
-rw-r--r--src/core/iomgr/alarm.c4
-rw-r--r--src/core/iomgr/alarm_internal.h6
-rw-r--r--src/core/iomgr/iomgr.c10
-rw-r--r--src/core/iomgr/iomgr.h4
-rw-r--r--src/core/iomgr/iomgr_internal.h8
-rw-r--r--src/core/iomgr/iomgr_posix.c4
-rw-r--r--src/core/iomgr/iomgr_posix.h4
-rw-r--r--src/core/iomgr/pollset_posix.c6
-rw-r--r--src/core/iomgr/pollset_posix.h2
-rw-r--r--src/core/iomgr/socket_utils_common_posix.c4
-rw-r--r--src/core/iomgr/socket_utils_posix.h2
-rw-r--r--src/core/iomgr/tcp_server.h2
-rw-r--r--src/core/iomgr/tcp_server_posix.c6
-rw-r--r--src/core/security/credentials.c2
-rw-r--r--src/core/statistics/census_init.c4
-rw-r--r--src/core/statistics/census_interface.h6
-rw-r--r--src/core/statistics/census_log.c10
-rw-r--r--src/core/statistics/census_log.h8
-rw-r--r--src/core/statistics/census_rpc_stats.c10
-rw-r--r--src/core/statistics/census_rpc_stats.h6
-rw-r--r--src/core/statistics/census_tracing.c14
-rw-r--r--src/core/statistics/census_tracing.h8
-rw-r--r--src/core/support/cpu.h4
-rw-r--r--src/core/support/cpu_linux.c4
-rw-r--r--src/core/support/cpu_posix.c4
-rw-r--r--src/core/support/log_linux.c2
-rw-r--r--src/core/support/log_posix.c2
-rw-r--r--src/core/support/slice.c2
-rw-r--r--src/core/support/string.c2
-rw-r--r--src/core/surface/completion_queue.c4
-rw-r--r--src/core/surface/init.c4
-rw-r--r--src/core/transport/chttp2/alpn.c2
-rw-r--r--src/core/transport/chttp2/alpn.h2
-rw-r--r--src/core/transport/chttp2/frame_settings.c2
-rw-r--r--src/core/transport/chttp2/frame_settings.h2
-rw-r--r--src/core/transport/chttp2/gen_hpack_tables.c14
-rw-r--r--src/core/transport/metadata.c2
-rw-r--r--src/core/transport/metadata.h2
-rw-r--r--test/core/channel/channel_stack_test.c2
-rw-r--r--test/core/compression/message_compress_test.c2
-rw-r--r--test/core/echo/server.c2
-rw-r--r--test/core/end2end/tests/cancel_after_accept.c2
-rw-r--r--test/core/end2end/tests/cancel_after_accept_and_writes_closed.c2
-rw-r--r--test/core/end2end/tests/cancel_after_invoke.c2
-rw-r--r--test/core/end2end/tests/cancel_before_invoke.c2
-rw-r--r--test/core/end2end/tests/cancel_in_a_vacuum.c2
-rw-r--r--test/core/end2end/tests/disappearing_server.c2
-rw-r--r--test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c2
-rw-r--r--test/core/end2end/tests/early_server_shutdown_finishes_tags.c2
-rw-r--r--test/core/end2end/tests/invoke_large_request.c2
-rw-r--r--test/core/end2end/tests/max_concurrent_streams.c2
-rw-r--r--test/core/end2end/tests/no_op.c2
-rw-r--r--test/core/end2end/tests/ping_pong_streaming.c2
-rw-r--r--test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c2
-rw-r--r--test/core/end2end/tests/request_response_with_metadata_and_payload.c2
-rw-r--r--test/core/end2end/tests/request_response_with_payload.c2
-rw-r--r--test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c2
-rw-r--r--test/core/end2end/tests/request_with_large_metadata.c2
-rw-r--r--test/core/end2end/tests/request_with_payload.c2
-rw-r--r--test/core/end2end/tests/simple_delayed_request.c2
-rw-r--r--test/core/end2end/tests/simple_request.c2
-rw-r--r--test/core/end2end/tests/thread_stress.c6
-rw-r--r--test/core/end2end/tests/writes_done_hangs_with_pending_read.c2
-rw-r--r--test/core/fling/client.c10
-rw-r--r--test/core/fling/server.c2
-rw-r--r--test/core/httpcli/format_request_test.c8
-rw-r--r--test/core/iomgr/alarm_heap_test.c6
-rw-r--r--test/core/iomgr/alarm_list_test.c6
-rw-r--r--test/core/iomgr/alarm_test.c2
-rw-r--r--test/core/iomgr/fd_posix_test.c4
-rw-r--r--test/core/iomgr/resolve_address_test.c16
-rw-r--r--test/core/iomgr/sockaddr_utils_test.c8
-rw-r--r--test/core/iomgr/tcp_client_posix_test.c8
-rw-r--r--test/core/iomgr/tcp_posix_test.c4
-rw-r--r--test/core/iomgr/tcp_server_posix_test.c8
-rw-r--r--test/core/iomgr/time_averaged_stats_test.c16
-rw-r--r--test/core/network_benchmarks/low_level_ping_pong.c2
-rw-r--r--test/core/security/secure_endpoint_test.c2
-rw-r--r--test/core/statistics/census_log_tests.c28
-rw-r--r--test/core/statistics/census_stub_test.c2
-rw-r--r--test/core/statistics/hash_table_test.c14
-rw-r--r--test/core/statistics/rpc_stats_test.c10
-rw-r--r--test/core/statistics/trace_test.c12
-rw-r--r--test/core/statistics/window_stats_test.c10
-rw-r--r--test/core/support/cmdline_test.c30
-rw-r--r--test/core/support/histogram_test.c8
-rw-r--r--test/core/support/host_port_test.c4
-rw-r--r--test/core/support/slice_test.c8
-rw-r--r--test/core/support/string_test.c8
-rw-r--r--test/core/support/time_test.c2
-rw-r--r--test/core/surface/byte_buffer_reader_test.c6
-rw-r--r--test/core/surface/completion_queue_test.c20
-rw-r--r--test/core/transport/chttp2/hpack_table_test.c6
-rw-r--r--test/core/transport/chttp2/stream_encoder_test.c8
-rw-r--r--test/core/transport/chttp2/stream_map_test.c6
-rw-r--r--test/core/transport/chttp2/timeout_encoding_test.c6
-rw-r--r--test/core/transport/metadata_test.c18
-rw-r--r--test/core/transport/transport_end2end_tests.c12
-rw-r--r--test/core/util/grpc_profiler.c2
-rw-r--r--test/core/util/port_posix.c4
-rw-r--r--test/core/util/test_config.c2
103 files changed, 287 insertions, 287 deletions
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index 34c75810b7..40a3d2acb5 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -232,12 +232,12 @@ typedef struct grpc_event {
} grpc_event;
/* Initialize the grpc library */
-void grpc_init();
+void grpc_init(void);
/* Shutdown the grpc library */
-void grpc_shutdown();
+void grpc_shutdown(void);
-grpc_completion_queue *grpc_completion_queue_create();
+grpc_completion_queue *grpc_completion_queue_create(void);
/* Blocks until an event is available, the completion queue is being shutdown,
or deadline is reached. Returns NULL on timeout, otherwise the event that
diff --git a/include/grpc/support/slice.h b/include/grpc/support/slice.h
index 597b5688fc..7828ccdd13 100644
--- a/include/grpc/support/slice.h
+++ b/include/grpc/support/slice.h
@@ -163,7 +163,7 @@ gpr_slice gpr_slice_split_tail(gpr_slice *s, size_t split);
Requires s intialized, split <= s.length */
gpr_slice gpr_slice_split_head(gpr_slice *s, size_t split);
-gpr_slice gpr_empty_slice();
+gpr_slice gpr_empty_slice(void);
/* Returns <0 if a < b, ==0 if a == b, >0 if a > b */
int gpr_slice_cmp(gpr_slice a, gpr_slice b);
diff --git a/src/core/iomgr/alarm.c b/src/core/iomgr/alarm.c
index 2664879323..5b80368e3a 100644
--- a/src/core/iomgr/alarm.c
+++ b/src/core/iomgr/alarm.c
@@ -100,7 +100,7 @@ void grpc_alarm_list_init(gpr_timespec now) {
}
}
-void grpc_alarm_list_shutdown() {
+void grpc_alarm_list_shutdown(void) {
int i;
while (run_some_expired_alarms(NULL, gpr_inf_future, NULL, 0))
;
@@ -360,7 +360,7 @@ int grpc_alarm_check(gpr_mu *drop_mu, gpr_timespec now, gpr_timespec *next) {
return run_some_expired_alarms(drop_mu, now, next, 1);
}
-gpr_timespec grpc_alarm_list_next_timeout() {
+gpr_timespec grpc_alarm_list_next_timeout(void) {
gpr_timespec out;
gpr_mu_lock(&g_mu);
out = g_shard_queue[0]->min_deadline;
diff --git a/src/core/iomgr/alarm_internal.h b/src/core/iomgr/alarm_internal.h
index 12b6ab4286..5c6b869302 100644
--- a/src/core/iomgr/alarm_internal.h
+++ b/src/core/iomgr/alarm_internal.h
@@ -42,12 +42,12 @@
int grpc_alarm_check(gpr_mu *drop_mu, gpr_timespec now, gpr_timespec *next);
void grpc_alarm_list_init(gpr_timespec now);
-void grpc_alarm_list_shutdown();
+void grpc_alarm_list_shutdown(void);
-gpr_timespec grpc_alarm_list_next_timeout();
+gpr_timespec grpc_alarm_list_next_timeout(void);
/* the following must be implemented by each iomgr implementation */
-void grpc_kick_poller();
+void grpc_kick_poller(void);
#endif /* __GRPC_INTERNAL_IOMGR_ALARM_INTERNAL_H_ */
diff --git a/src/core/iomgr/iomgr.c b/src/core/iomgr/iomgr.c
index 03f56a50a3..7f266ab235 100644
--- a/src/core/iomgr/iomgr.c
+++ b/src/core/iomgr/iomgr.c
@@ -80,9 +80,9 @@ static void background_callback_executor(void *ignored) {
gpr_event_set(&g_background_callback_executor_done, (void *)1);
}
-void grpc_kick_poller() { gpr_cv_broadcast(&g_cv); }
+void grpc_kick_poller(void) { gpr_cv_broadcast(&g_cv); }
-void grpc_iomgr_init() {
+void grpc_iomgr_init(void) {
gpr_thd_id id;
gpr_mu_init(&g_mu);
gpr_cv_init(&g_cv);
@@ -93,7 +93,7 @@ void grpc_iomgr_init() {
gpr_thd_new(&id, background_callback_executor, NULL, NULL);
}
-void grpc_iomgr_shutdown() {
+void grpc_iomgr_shutdown(void) {
delayed_callback *cb;
gpr_timespec shutdown_deadline =
gpr_time_add(gpr_now(), gpr_time_from_seconds(10));
@@ -134,13 +134,13 @@ void grpc_iomgr_shutdown() {
gpr_cv_destroy(&g_cv);
}
-void grpc_iomgr_ref() {
+void grpc_iomgr_ref(void) {
gpr_mu_lock(&g_mu);
++g_refs;
gpr_mu_unlock(&g_mu);
}
-void grpc_iomgr_unref() {
+void grpc_iomgr_unref(void) {
gpr_mu_lock(&g_mu);
if (0 == --g_refs) {
gpr_cv_signal(&g_cv);
diff --git a/src/core/iomgr/iomgr.h b/src/core/iomgr/iomgr.h
index 16991a9b90..06dc2e5dbf 100644
--- a/src/core/iomgr/iomgr.h
+++ b/src/core/iomgr/iomgr.h
@@ -37,8 +37,8 @@
/* gRPC Callback definition */
typedef void (*grpc_iomgr_cb_func)(void *arg, int success);
-void grpc_iomgr_init();
-void grpc_iomgr_shutdown();
+void grpc_iomgr_init(void);
+void grpc_iomgr_shutdown(void);
/* This function is called from within a callback or from anywhere else
and causes the invocation of a callback at some point in the future */
diff --git a/src/core/iomgr/iomgr_internal.h b/src/core/iomgr/iomgr_internal.h
index 5f72542777..e9962a0f66 100644
--- a/src/core/iomgr/iomgr_internal.h
+++ b/src/core/iomgr/iomgr_internal.h
@@ -42,10 +42,10 @@ int grpc_maybe_call_delayed_callbacks(gpr_mu *drop_mu, int success);
void grpc_iomgr_add_delayed_callback(grpc_iomgr_cb_func cb, void *cb_arg,
int success);
-void grpc_iomgr_ref();
-void grpc_iomgr_unref();
+void grpc_iomgr_ref(void);
+void grpc_iomgr_unref(void);
-void grpc_iomgr_platform_init();
-void grpc_iomgr_platform_shutdown();
+void grpc_iomgr_platform_init(void);
+void grpc_iomgr_platform_shutdown(void);
#endif /* __GRPC_INTERNAL_IOMGR_IOMGR_INTERNAL_H_ */
diff --git a/src/core/iomgr/iomgr_posix.c b/src/core/iomgr/iomgr_posix.c
index ff9195ec1d..61fec6bc53 100644
--- a/src/core/iomgr/iomgr_posix.c
+++ b/src/core/iomgr/iomgr_posix.c
@@ -33,6 +33,6 @@
#include "src/core/iomgr/iomgr_posix.h"
-void grpc_iomgr_platform_init() { grpc_pollset_global_init(); }
+void grpc_iomgr_platform_init(void) { grpc_pollset_global_init(); }
-void grpc_iomgr_platform_shutdown() { grpc_pollset_global_shutdown(); }
+void grpc_iomgr_platform_shutdown(void) { grpc_pollset_global_shutdown(); }
diff --git a/src/core/iomgr/iomgr_posix.h b/src/core/iomgr/iomgr_posix.h
index ca5af3e527..86973a050d 100644
--- a/src/core/iomgr/iomgr_posix.h
+++ b/src/core/iomgr/iomgr_posix.h
@@ -36,7 +36,7 @@
#include "src/core/iomgr/iomgr_internal.h"
-void grpc_pollset_global_init();
-void grpc_pollset_global_shutdown();
+void grpc_pollset_global_init(void);
+void grpc_pollset_global_shutdown(void);
#endif /* __GRPC_INTERNAL_IOMGR_IOMGR_POSIX_H_ */
diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c
index ff00e06429..6f1b3ced7d 100644
--- a/src/core/iomgr/pollset_posix.c
+++ b/src/core/iomgr/pollset_posix.c
@@ -129,9 +129,9 @@ void grpc_kick_drain(grpc_pollset *p) {
/* global state management */
-grpc_pollset *grpc_backup_pollset() { return &g_backup_pollset; }
+grpc_pollset *grpc_backup_pollset(void) { return &g_backup_pollset; }
-void grpc_pollset_global_init() {
+void grpc_pollset_global_init(void) {
int i;
gpr_thd_id id;
@@ -151,7 +151,7 @@ void grpc_pollset_global_init() {
gpr_thd_new(&id, backup_poller, NULL, NULL);
}
-void grpc_pollset_global_shutdown() {
+void grpc_pollset_global_shutdown(void) {
int i;
/* terminate the backup poller thread */
diff --git a/src/core/iomgr/pollset_posix.h b/src/core/iomgr/pollset_posix.h
index f051079f5b..32a8f533ae 100644
--- a/src/core/iomgr/pollset_posix.h
+++ b/src/core/iomgr/pollset_posix.h
@@ -86,7 +86,7 @@ void grpc_kick_drain(grpc_pollset *p);
regardless of applications listening to events. Relying on this is slow
however (the backup pollset only listens every 100ms or so) - so it's not
to be relied on. */
-grpc_pollset *grpc_backup_pollset();
+grpc_pollset *grpc_backup_pollset(void);
/* turn a pollset into a multipoller: platform specific */
void grpc_platform_become_multipoller(grpc_pollset *pollset,
diff --git a/src/core/iomgr/socket_utils_common_posix.c b/src/core/iomgr/socket_utils_common_posix.c
index 7f2b43f2ca..d65b025d70 100644
--- a/src/core/iomgr/socket_utils_common_posix.c
+++ b/src/core/iomgr/socket_utils_common_posix.c
@@ -115,7 +115,7 @@ int grpc_set_socket_low_latency(int fd, int low_latency) {
static gpr_once g_probe_ipv6_once = GPR_ONCE_INIT;
static int g_ipv6_loopback_available;
-static void probe_ipv6_once() {
+static void probe_ipv6_once(void) {
int fd = socket(AF_INET6, SOCK_STREAM, 0);
g_ipv6_loopback_available = 0;
if (fd < 0) {
@@ -135,7 +135,7 @@ static void probe_ipv6_once() {
}
}
-int grpc_ipv6_loopback_available() {
+int grpc_ipv6_loopback_available(void) {
gpr_once_init(&g_probe_ipv6_once, probe_ipv6_once);
return g_ipv6_loopback_available;
}
diff --git a/src/core/iomgr/socket_utils_posix.h b/src/core/iomgr/socket_utils_posix.h
index 9c5d93c2b4..a84457f01d 100644
--- a/src/core/iomgr/socket_utils_posix.h
+++ b/src/core/iomgr/socket_utils_posix.h
@@ -61,7 +61,7 @@ int grpc_set_socket_low_latency(int fd, int low_latency);
and bind IPv6 sockets, but cannot connect to a getsockname() of [::]:port
without a valid loopback interface. Rather than expose this half-broken
state to library users, we turn off IPv6 sockets. */
-int grpc_ipv6_loopback_available();
+int grpc_ipv6_loopback_available(void);
/* An enum to keep track of IPv4/IPv6 socket modes.
diff --git a/src/core/iomgr/tcp_server.h b/src/core/iomgr/tcp_server.h
index d881e146b9..8ffd7d3569 100644
--- a/src/core/iomgr/tcp_server.h
+++ b/src/core/iomgr/tcp_server.h
@@ -46,7 +46,7 @@ typedef struct grpc_tcp_server grpc_tcp_server;
typedef void (*grpc_tcp_server_cb)(void *arg, grpc_endpoint *ep);
/* Create a server, initially not bound to any ports */
-grpc_tcp_server *grpc_tcp_server_create();
+grpc_tcp_server *grpc_tcp_server_create(void);
/* Start listening to bound ports */
void grpc_tcp_server_start(grpc_tcp_server *server, grpc_pollset *pollset,
diff --git a/src/core/iomgr/tcp_server_posix.c b/src/core/iomgr/tcp_server_posix.c
index 753e24c38e..5762eb8a97 100644
--- a/src/core/iomgr/tcp_server_posix.c
+++ b/src/core/iomgr/tcp_server_posix.c
@@ -84,7 +84,7 @@ struct grpc_tcp_server {
size_t port_capacity;
};
-grpc_tcp_server *grpc_tcp_server_create() {
+grpc_tcp_server *grpc_tcp_server_create(void) {
grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server));
gpr_mu_init(&s->mu);
gpr_cv_init(&s->cv);
@@ -120,7 +120,7 @@ void grpc_tcp_server_destroy(grpc_tcp_server *s) {
}
/* get max listen queue size on linux */
-static void init_max_accept_queue_size() {
+static void init_max_accept_queue_size(void) {
int n = SOMAXCONN;
char buf[64];
FILE *fp = fopen("/proc/sys/net/core/somaxconn", "r");
@@ -147,7 +147,7 @@ static void init_max_accept_queue_size() {
}
}
-static int get_max_accept_queue_size() {
+static int get_max_accept_queue_size(void) {
gpr_once_init(&s_init_max_accept_queue_size, init_max_accept_queue_size);
return s_max_accept_queue_size;
}
diff --git a/src/core/security/credentials.c b/src/core/security/credentials.c
index d3bba0fb1f..ea1a6cd1c4 100644
--- a/src/core/security/credentials.c
+++ b/src/core/security/credentials.c
@@ -638,7 +638,7 @@ grpc_credentials *grpc_fake_transport_security_credentials_create(void) {
}
grpc_server_credentials *
-grpc_fake_transport_security_server_credentials_create() {
+grpc_fake_transport_security_server_credentials_create(void) {
grpc_server_credentials *c = gpr_malloc(sizeof(grpc_server_credentials));
memset(c, 0, sizeof(grpc_server_credentials));
c->type = GRPC_CREDENTIALS_TYPE_FAKE_TRANSPORT_SECURITY;
diff --git a/src/core/statistics/census_init.c b/src/core/statistics/census_init.c
index bcb9ff9ad4..cbf2089f3f 100644
--- a/src/core/statistics/census_init.c
+++ b/src/core/statistics/census_init.c
@@ -37,13 +37,13 @@
#include "src/core/statistics/census_rpc_stats.h"
#include "src/core/statistics/census_tracing.h"
-void census_init() {
+void census_init(void) {
gpr_log(GPR_INFO, "Initialize census library.");
census_tracing_init();
census_stats_store_init();
}
-void census_shutdown() {
+void census_shutdown(void) {
gpr_log(GPR_INFO, "Shutdown census library.");
census_stats_store_shutdown();
census_tracing_shutdown();
diff --git a/src/core/statistics/census_interface.h b/src/core/statistics/census_interface.h
index af9c70c4fb..8e586382f7 100644
--- a/src/core/statistics/census_interface.h
+++ b/src/core/statistics/census_interface.h
@@ -49,10 +49,10 @@ typedef struct census_op_id {
typedef struct census_rpc_stats census_rpc_stats;
/* Initializes Census library. No-op if Census is already initialized. */
-void census_init();
+void census_init(void);
/* Shutdown Census Library. */
-void census_shutdown();
+void census_shutdown(void);
/* Annotates grpc method name on a census_op_id. The method name has the format
of <full quantified rpc service name>/<rpc function name>. Returns 0 iff
@@ -68,7 +68,7 @@ int census_add_method_tag(census_op_id op_id, const char* method_name);
void census_tracing_print(census_op_id op_id, const char* annotation);
/* Starts tracing for an RPC. Returns a locally unique census_op_id */
-census_op_id census_tracing_start_op();
+census_op_id census_tracing_start_op(void);
/* Ends tracing. Calling this function will invalidate the input op_id. */
void census_tracing_end_op(census_op_id op_id);
diff --git a/src/core/statistics/census_log.c b/src/core/statistics/census_log.c
index 56fa430bbd..404e92cc62 100644
--- a/src/core/statistics/census_log.c
+++ b/src/core/statistics/census_log.c
@@ -368,7 +368,7 @@ static void cl_block_end_read(cl_block* block) {
/* Allocates a new free block (or recycles an available dirty block if log is
configured to discard old records). Returns NULL if out-of-space. */
-static cl_block* cl_allocate_block() {
+static cl_block* cl_allocate_block(void) {
cl_block* block = cl_block_list_head(&g_log.free_block_list);
if (block != NULL) {
cl_block_list_remove(&g_log.free_block_list, block);
@@ -496,7 +496,7 @@ void census_log_initialize(size_t size_in_mb, int discard_old_records) {
g_log.initialized = 1;
}
-void census_log_shutdown() {
+void census_log_shutdown(void) {
GPR_ASSERT(g_log.initialized);
gpr_mu_destroy(&g_log.lock);
gpr_free_aligned(g_log.core_local_blocks);
@@ -551,7 +551,7 @@ void census_log_end_write(void* record, size_t bytes_written) {
cl_block_end_write(cl_get_block(record), bytes_written);
}
-void census_log_init_reader() {
+void census_log_init_reader(void) {
GPR_ASSERT(g_log.initialized);
gpr_mu_lock(&g_log.lock);
/* If a block is locked for reading unlock it. */
@@ -584,7 +584,7 @@ const void* census_log_read_next(size_t* bytes_available) {
return NULL;
}
-size_t census_log_remaining_space() {
+size_t census_log_remaining_space(void) {
size_t space;
GPR_ASSERT(g_log.initialized);
gpr_mu_lock(&g_log.lock);
@@ -598,7 +598,7 @@ size_t census_log_remaining_space() {
return space;
}
-int census_log_out_of_space_count() {
+int census_log_out_of_space_count(void) {
GPR_ASSERT(g_log.initialized);
return gpr_atm_acq_load(&g_log.out_of_space_count);
}
diff --git a/src/core/statistics/census_log.h b/src/core/statistics/census_log.h
index fa9229b122..0d89df7992 100644
--- a/src/core/statistics/census_log.h
+++ b/src/core/statistics/census_log.h
@@ -53,7 +53,7 @@ void census_log_initialize(size_t size_in_mb, int discard_old_records);
- no in progress or future call to any census_log functions
- no incomplete records
*/
-void census_log_shutdown();
+void census_log_shutdown(void);
/* Allocates and returns a 'size' bytes record and marks it in use. A
subsequent census_log_end_write() marks the record complete. The
@@ -74,7 +74,7 @@ void census_log_end_write(void* record, size_t bytes_written);
is read. census_log_init_reader() starts the iteration or aborts the
current iteration.
*/
-void census_log_init_reader();
+void census_log_init_reader(void);
const void* census_log_read_next(size_t* bytes_available);
/* Returns estimated remaining space across all blocks, in bytes. If log is
@@ -82,10 +82,10 @@ const void* census_log_read_next(size_t* bytes_available);
returns space available in empty blocks (partially filled blocks are
treated as full).
*/
-size_t census_log_remaining_space();
+size_t census_log_remaining_space(void);
/* Returns the number of times gprc_stats_log_start_write() failed due to
out-of-space. */
-int census_log_out_of_space_count();
+int census_log_out_of_space_count(void);
#endif /* __GRPC_INTERNAL_STATISTICS_LOG_H__ */
diff --git a/src/core/statistics/census_rpc_stats.c b/src/core/statistics/census_rpc_stats.c
index a1ac2abff3..2db3054a0d 100644
--- a/src/core/statistics/census_rpc_stats.c
+++ b/src/core/statistics/census_rpc_stats.c
@@ -59,9 +59,9 @@ static gpr_mu g_mu;
static census_ht* g_client_stats_store = NULL;
static census_ht* g_server_stats_store = NULL;
-static void init_mutex() { gpr_mu_init(&g_mu); }
+static void init_mutex(void) { gpr_mu_init(&g_mu); }
-static void init_mutex_once() {
+static void init_mutex_once(void) {
gpr_once_init(&g_stats_store_mu_init, init_mutex);
}
@@ -115,7 +115,7 @@ static gpr_timespec min_hour_total_intervals[3] = {
static const census_window_stats_stat_info window_stats_settings = {
sizeof(census_rpc_stats), init_rpc_stats, stat_add, stat_add_proportion};
-census_rpc_stats* census_rpc_stats_create_empty() {
+census_rpc_stats* census_rpc_stats_create_empty(void) {
census_rpc_stats* ret =
(census_rpc_stats*)gpr_malloc(sizeof(census_rpc_stats));
memset(ret, 0, sizeof(census_rpc_stats));
@@ -220,7 +220,7 @@ void census_get_server_stats(census_aggregated_rpc_stats* data) {
get_stats(g_server_stats_store, data);
}
-void census_stats_store_init() {
+void census_stats_store_init(void) {
gpr_log(GPR_INFO, "Initialize census stats store.");
init_mutex_once();
gpr_mu_lock(&g_mu);
@@ -233,7 +233,7 @@ void census_stats_store_init() {
gpr_mu_unlock(&g_mu);
}
-void census_stats_store_shutdown() {
+void census_stats_store_shutdown(void) {
gpr_log(GPR_INFO, "Shutdown census stats store.");
init_mutex_once();
gpr_mu_lock(&g_mu);
diff --git a/src/core/statistics/census_rpc_stats.h b/src/core/statistics/census_rpc_stats.h
index a9c999aa5c..81466907fd 100644
--- a/src/core/statistics/census_rpc_stats.h
+++ b/src/core/statistics/census_rpc_stats.h
@@ -53,7 +53,7 @@ struct census_rpc_stats {
};
/* Creates an empty rpc stats object on heap. */
-census_rpc_stats* census_rpc_stats_create_empty();
+census_rpc_stats* census_rpc_stats_create_empty(void);
typedef struct census_per_method_rpc_stats {
const char* method;
@@ -91,8 +91,8 @@ void census_get_server_stats(census_aggregated_rpc_stats* data_map);
DO NOT CALL from outside of grpc code. */
void census_get_client_stats(census_aggregated_rpc_stats* data_map);
-void census_stats_store_init();
-void census_stats_store_shutdown();
+void census_stats_store_init(void);
+void census_stats_store_shutdown(void);
#ifdef __cplusplus
}
diff --git a/src/core/statistics/census_tracing.c b/src/core/statistics/census_tracing.c
index 45302cd6ab..99091cf80b 100644
--- a/src/core/statistics/census_tracing.c
+++ b/src/core/statistics/census_tracing.c
@@ -93,11 +93,11 @@ static gpr_uint64 op_id_2_uint64(census_op_id* id) {
return ret;
}
-static void init_mutex() { gpr_mu_init(&g_mu); }
+static void init_mutex(void) { gpr_mu_init(&g_mu); }
-static void init_mutex_once() { gpr_once_init(&g_init_mutex_once, init_mutex); }
+static void init_mutex_once(void) { gpr_once_init(&g_init_mutex_once, init_mutex); }
-census_op_id census_tracing_start_op() {
+census_op_id census_tracing_start_op(void) {
gpr_mu_lock(&g_mu);
{
trace_obj* ret = (trace_obj*)gpr_malloc(sizeof(trace_obj));
@@ -164,7 +164,7 @@ void census_tracing_end_op(census_op_id op_id) {
gpr_mu_unlock(&g_mu);
}
-void census_tracing_init() {
+void census_tracing_init(void) {
gpr_log(GPR_INFO, "Initialize census trace store.");
init_mutex_once();
gpr_mu_lock(&g_mu);
@@ -177,7 +177,7 @@ void census_tracing_init() {
gpr_mu_unlock(&g_mu);
}
-void census_tracing_shutdown() {
+void census_tracing_shutdown(void) {
gpr_log(GPR_INFO, "Shutdown census trace store.");
gpr_mu_lock(&g_mu);
if (g_trace_store != NULL) {
@@ -189,9 +189,9 @@ void census_tracing_shutdown() {
gpr_mu_unlock(&g_mu);
}
-void census_internal_lock_trace_store() { gpr_mu_lock(&g_mu); }
+void census_internal_lock_trace_store(void) { gpr_mu_lock(&g_mu); }
-void census_internal_unlock_trace_store() { gpr_mu_unlock(&g_mu); }
+void census_internal_unlock_trace_store(void) { gpr_mu_unlock(&g_mu); }
trace_obj* census_get_trace_obj_locked(census_op_id op_id) {
if (g_trace_store == NULL) {
diff --git a/src/core/statistics/census_tracing.h b/src/core/statistics/census_tracing.h
index 2285a5cd6b..604096ba54 100644
--- a/src/core/statistics/census_tracing.h
+++ b/src/core/statistics/census_tracing.h
@@ -38,10 +38,10 @@
typedef struct trace_obj trace_obj;
/* Initializes trace store. This function is thread safe. */
-void census_tracing_init();
+void census_tracing_init(void);
/* Shutsdown trace store. This function is thread safe. */
-void census_tracing_shutdown();
+void census_tracing_shutdown(void);
/* Gets trace obj corresponding to the input op_id. Returns NULL if trace store
is not initialized or trace obj is not found. Requires trace store being
@@ -50,8 +50,8 @@ trace_obj* census_get_trace_obj_locked(census_op_id op_id);
/* The following two functions acquire and release the trace store global lock.
They are for census internal use only. */
-void census_internal_lock_trace_store();
-void census_internal_unlock_trace_store();
+void census_internal_lock_trace_store(void);
+void census_internal_unlock_trace_store(void);
/* Gets method tag name associated with the input trace object. */
const char* census_get_trace_method_name(const trace_obj* trace);
diff --git a/src/core/support/cpu.h b/src/core/support/cpu.h
index 2435ec0353..1c2dde74ee 100644
--- a/src/core/support/cpu.h
+++ b/src/core/support/cpu.h
@@ -38,12 +38,12 @@
/* Return the number of CPU cores on the current system. Will return 0 if
if information is not available. */
-int gpr_cpu_num_cores();
+int gpr_cpu_num_cores(void);
/* Return the CPU on which the current thread is executing; N.B. This should
be considered advisory only - it is possible that the thread is switched
to a different CPU at any time. Returns a value in range
[0, gpr_cpu_num_cores() - 1] */
-int gpr_cpu_current_cpu();
+int gpr_cpu_current_cpu(void);
#endif /* __GRPC_INTERNAL_SUPPORT_CPU_H__ */
diff --git a/src/core/support/cpu_linux.c b/src/core/support/cpu_linux.c
index 922b61c3c5..d800628806 100644
--- a/src/core/support/cpu_linux.c
+++ b/src/core/support/cpu_linux.c
@@ -75,7 +75,7 @@
#include <grpc/support/log.h>
-int gpr_cpu_num_cores() {
+int gpr_cpu_num_cores(void) {
static int ncpus = 0;
if (ncpus == 0) {
ncpus = sysconf(_SC_NPROCESSORS_ONLN);
@@ -87,7 +87,7 @@ int gpr_cpu_num_cores() {
return ncpus;
}
-int gpr_cpu_current_cpu() {
+int gpr_cpu_current_cpu(void) {
int cpu = sched_getcpu();
if (cpu < 0) {
gpr_log(GPR_ERROR, "Error determining current CPU: %s\n", strerror(errno));
diff --git a/src/core/support/cpu_posix.c b/src/core/support/cpu_posix.c
index 3dd1c548b0..2ea80807fc 100644
--- a/src/core/support/cpu_posix.c
+++ b/src/core/support/cpu_posix.c
@@ -45,7 +45,7 @@
static __thread char magic_thread_local;
-int gpr_cpu_num_cores() {
+int gpr_cpu_num_cores(void) {
static int ncpus = 0;
if (ncpus == 0) {
ncpus = sysconf(_SC_NPROCESSORS_ONLN);
@@ -63,7 +63,7 @@ static size_t shard_ptr(const void *info) {
return ((x >> 4) ^ (x >> 9) ^ (x >> 14)) % gpr_cpu_num_cores();
}
-int gpr_cpu_current_cpu() {
+int gpr_cpu_current_cpu(void) {
/* NOTE: there's no way I know to return the actual cpu index portably...
most code that's using this is using it to shard across work queues though,
so here we use thread identity instead to achieve a similar though not
diff --git a/src/core/support/log_linux.c b/src/core/support/log_linux.c
index 36fb4b5051..a0307e1a9a 100644
--- a/src/core/support/log_linux.c
+++ b/src/core/support/log_linux.c
@@ -47,7 +47,7 @@
#include <sys/syscall.h>
#include <unistd.h>
-static long gettid() { return syscall(__NR_gettid); }
+static long gettid(void) { return syscall(__NR_gettid); }
void gpr_log(const char *file, int line, gpr_log_severity severity,
const char *format, ...) {
diff --git a/src/core/support/log_posix.c b/src/core/support/log_posix.c
index ee2705a2c2..1292c9e8c3 100644
--- a/src/core/support/log_posix.c
+++ b/src/core/support/log_posix.c
@@ -50,7 +50,7 @@
#include <time.h>
#include <pthread.h>
-static gpr_intptr gettid() { return (gpr_intptr)pthread_self(); }
+static gpr_intptr gettid(void) { return (gpr_intptr)pthread_self(); }
void gpr_log(const char *file, int line, gpr_log_severity severity,
const char *format, ...) {
diff --git a/src/core/support/slice.c b/src/core/support/slice.c
index fcdeb478fb..836a5a6c2a 100644
--- a/src/core/support/slice.c
+++ b/src/core/support/slice.c
@@ -37,7 +37,7 @@
#include <string.h>
-gpr_slice gpr_empty_slice() {
+gpr_slice gpr_empty_slice(void) {
gpr_slice out;
out.refcount = 0;
out.data.inlined.length = 0;
diff --git a/src/core/support/string.c b/src/core/support/string.c
index b1f0795846..7960547735 100644
--- a/src/core/support/string.c
+++ b/src/core/support/string.c
@@ -63,7 +63,7 @@ typedef struct {
char *data;
} hexout;
-static hexout hexout_create() {
+static hexout hexout_create(void) {
hexout r = {0, 0, NULL};
return r;
}
diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c
index b59c36e03a..0f09933fc0 100644
--- a/src/core/surface/completion_queue.c
+++ b/src/core/surface/completion_queue.c
@@ -85,7 +85,7 @@ struct grpc_completion_queue {
/* Default do-nothing on_finish function */
static void null_on_finish(void *user_data, grpc_op_error error) {}
-grpc_completion_queue *grpc_completion_queue_create() {
+grpc_completion_queue *grpc_completion_queue_create(void) {
grpc_completion_queue *cc = gpr_malloc(sizeof(grpc_completion_queue));
memset(cc, 0, sizeof(*cc));
/* Initial ref is dropped by grpc_completion_queue_shutdown */
@@ -251,7 +251,7 @@ void grpc_cq_end_new_rpc(grpc_completion_queue *cc, void *tag, grpc_call *call,
}
/* Create a GRPC_QUEUE_SHUTDOWN event without queuing it anywhere */
-static event *create_shutdown_event() {
+static event *create_shutdown_event(void) {
event *ev = gpr_malloc(sizeof(event));
ev->base.type = GRPC_QUEUE_SHUTDOWN;
ev->base.call = NULL;
diff --git a/src/core/surface/init.c b/src/core/surface/init.c
index 832ec085c7..b5019eb03f 100644
--- a/src/core/surface/init.c
+++ b/src/core/surface/init.c
@@ -35,12 +35,12 @@
#include "src/core/statistics/census_interface.h"
#include "src/core/iomgr/iomgr.h"
-void grpc_init() {
+void grpc_init(void) {
grpc_iomgr_init();
census_init();
}
-void grpc_shutdown() {
+void grpc_shutdown(void) {
grpc_iomgr_shutdown();
census_shutdown();
}
diff --git a/src/core/transport/chttp2/alpn.c b/src/core/transport/chttp2/alpn.c
index 8107406f8b..bc4e789f60 100644
--- a/src/core/transport/chttp2/alpn.c
+++ b/src/core/transport/chttp2/alpn.c
@@ -46,7 +46,7 @@ int grpc_chttp2_is_alpn_version_supported(const char *version, size_t size) {
return 0;
}
-size_t grpc_chttp2_num_alpn_versions() {
+size_t grpc_chttp2_num_alpn_versions(void) {
return GPR_ARRAY_SIZE(supported_versions);
}
diff --git a/src/core/transport/chttp2/alpn.h b/src/core/transport/chttp2/alpn.h
index de4da8fedb..cb96f17831 100644
--- a/src/core/transport/chttp2/alpn.h
+++ b/src/core/transport/chttp2/alpn.h
@@ -40,7 +40,7 @@
int grpc_chttp2_is_alpn_version_supported(const char *version, size_t size);
/* Returns the number of protocol versions to advertise */
-size_t grpc_chttp2_num_alpn_versions();
+size_t grpc_chttp2_num_alpn_versions(void);
/* Returns the protocol version at index i (0 <= i <
* grpc_chttp2_num_alpn_versions()) */
diff --git a/src/core/transport/chttp2/frame_settings.c b/src/core/transport/chttp2/frame_settings.c
index d8bc492870..3ca973c07b 100644
--- a/src/core/transport/chttp2/frame_settings.c
+++ b/src/core/transport/chttp2/frame_settings.c
@@ -102,7 +102,7 @@ gpr_slice grpc_chttp2_settings_create(gpr_uint32 *old, const gpr_uint32 *new,
return output;
}
-gpr_slice grpc_chttp2_settings_ack_create() {
+gpr_slice grpc_chttp2_settings_ack_create(void) {
gpr_slice output = gpr_slice_malloc(9);
fill_header(GPR_SLICE_START_PTR(output), 0, GRPC_CHTTP2_FLAG_ACK);
return output;
diff --git a/src/core/transport/chttp2/frame_settings.h b/src/core/transport/chttp2/frame_settings.h
index 855f9636bb..fc513913d9 100644
--- a/src/core/transport/chttp2/frame_settings.h
+++ b/src/core/transport/chttp2/frame_settings.h
@@ -88,7 +88,7 @@ extern const grpc_chttp2_setting_parameters
gpr_slice grpc_chttp2_settings_create(gpr_uint32 *old, const gpr_uint32 *new,
gpr_uint32 force_mask, size_t count);
/* Create an ack settings frame */
-gpr_slice grpc_chttp2_settings_ack_create();
+gpr_slice grpc_chttp2_settings_ack_create(void);
grpc_chttp2_parse_error grpc_chttp2_settings_parser_begin_frame(
grpc_chttp2_settings_parser *parser, gpr_uint32 length, gpr_uint8 flags,
diff --git a/src/core/transport/chttp2/gen_hpack_tables.c b/src/core/transport/chttp2/gen_hpack_tables.c
index 3b9e8ed4dc..cd78fcc39a 100644
--- a/src/core/transport/chttp2/gen_hpack_tables.c
+++ b/src/core/transport/chttp2/gen_hpack_tables.c
@@ -86,7 +86,7 @@ static unsigned char suffix_mask(unsigned char prefix_len) {
return ~prefix_mask(prefix_len);
}
-static void generate_first_byte_lut() {
+static void generate_first_byte_lut(void) {
int i, j, n;
const spec *chrspec;
unsigned char suffix;
@@ -136,21 +136,21 @@ typedef struct { char included[GRPC_CHTTP2_NUM_HUFFSYMS]; } symset;
typedef struct { int values[16]; } nibblelut;
/* returns a symset that includes all possible symbols */
-static symset symset_all() {
+static symset symset_all(void) {
symset x;
memset(x.included, 1, sizeof(x.included));
return x;
}
/* returns a symset that includes no symbols */
-static symset symset_none() {
+static symset symset_none(void) {
symset x;
memset(x.included, 0, sizeof(x.included));
return x;
}
/* returns an empty nibblelut */
-static nibblelut nibblelut_empty() {
+static nibblelut nibblelut_empty(void) {
nibblelut x;
int i;
for (i = 0; i < 16; i++) {
@@ -296,7 +296,7 @@ static void dump_ctbl(const char *name) {
printf("};\n");
}
-static void generate_huff_tables() {
+static void generate_huff_tables(void) {
int i;
build_dec_tbl(state_index(0, symset_all(), &i), 0, 0, 0, -1, symset_all());
@@ -317,7 +317,7 @@ static void generate_huff_tables() {
dump_ctbl("emit_sub_tbl");
}
-static void generate_base64_huff_encoder_table() {
+static void generate_base64_huff_encoder_table(void) {
static const char alphabet[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
int i;
@@ -332,7 +332,7 @@ static void generate_base64_huff_encoder_table() {
printf("};\n");
}
-static void generate_base64_inverse_table() {
+static void generate_base64_inverse_table(void) {
static const char alphabet[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
unsigned char inverse[256];
diff --git a/src/core/transport/metadata.c b/src/core/transport/metadata.c
index e8ab216671..6881b871ec 100644
--- a/src/core/transport/metadata.c
+++ b/src/core/transport/metadata.c
@@ -154,7 +154,7 @@ grpc_mdctx *grpc_mdctx_create_with_seed(gpr_uint32 seed) {
return ctx;
}
-grpc_mdctx *grpc_mdctx_create() {
+grpc_mdctx *grpc_mdctx_create(void) {
/* This seed is used to prevent remote connections from controlling hash table
* collisions. It needs to be somewhat unpredictable to a remote connection.
*/
diff --git a/src/core/transport/metadata.h b/src/core/transport/metadata.h
index 943e65a981..ac845def37 100644
--- a/src/core/transport/metadata.h
+++ b/src/core/transport/metadata.h
@@ -82,7 +82,7 @@ struct grpc_mdelem {
};
/* Create/orphan a metadata context */
-grpc_mdctx *grpc_mdctx_create();
+grpc_mdctx *grpc_mdctx_create(void);
grpc_mdctx *grpc_mdctx_create_with_seed(gpr_uint32 seed);
void grpc_mdctx_orphan(grpc_mdctx *mdctx);
diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c
index 9bc1f738bc..fb52fe3270 100644
--- a/test/core/channel/channel_stack_test.c
+++ b/test/core/channel/channel_stack_test.c
@@ -76,7 +76,7 @@ static void channel_func(grpc_channel_element *elem,
++*(int *)(elem->channel_data);
}
-static void test_create_channel_stack() {
+static void test_create_channel_stack(void) {
const grpc_channel_filter filter = {
call_func, channel_func,
diff --git a/test/core/compression/message_compress_test.c b/test/core/compression/message_compress_test.c
index 583f187a23..d1e593564f 100644
--- a/test/core/compression/message_compress_test.c
+++ b/test/core/compression/message_compress_test.c
@@ -145,7 +145,7 @@ static gpr_slice create_test_value(test_value id) {
return gpr_slice_from_copied_string("bad value");
}
-static void test_bad_data() {
+static void test_bad_data(void) {
gpr_slice_buffer input;
gpr_slice_buffer output;
int i;
diff --git a/test/core/echo/server.c b/test/core/echo/server.c
index 2655fb2bfc..35f118dc9b 100644
--- a/test/core/echo/server.c
+++ b/test/core/echo/server.c
@@ -56,7 +56,7 @@ typedef struct {
gpr_intmax bytes_read;
} call_state;
-static void request_call() {
+static void request_call(void) {
call_state *tag = gpr_malloc(sizeof(*tag));
gpr_ref_init(&tag->pending_ops, 2);
tag->bytes_read = 0;
diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c
index 467d360aae..8568605197 100644
--- a/test/core/end2end/tests/cancel_after_accept.c
+++ b/test/core/end2end/tests/cancel_after_accept.c
@@ -72,7 +72,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c b/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c
index f75c629d2a..798051f01b 100644
--- a/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c
+++ b/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c
@@ -72,7 +72,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/cancel_after_invoke.c b/test/core/end2end/tests/cancel_after_invoke.c
index 4fab9f7eff..3c9122944b 100644
--- a/test/core/end2end/tests/cancel_after_invoke.c
+++ b/test/core/end2end/tests/cancel_after_invoke.c
@@ -72,7 +72,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/cancel_before_invoke.c b/test/core/end2end/tests/cancel_before_invoke.c
index 2d8d465b24..d5edcd4ac1 100644
--- a/test/core/end2end/tests/cancel_before_invoke.c
+++ b/test/core/end2end/tests/cancel_before_invoke.c
@@ -68,7 +68,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/cancel_in_a_vacuum.c b/test/core/end2end/tests/cancel_in_a_vacuum.c
index 1a4dfa7b73..0c684acf0a 100644
--- a/test/core/end2end/tests/cancel_in_a_vacuum.c
+++ b/test/core/end2end/tests/cancel_in_a_vacuum.c
@@ -70,7 +70,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/disappearing_server.c b/test/core/end2end/tests/disappearing_server.c
index 8d16367e0f..b27a356eaa 100644
--- a/test/core/end2end/tests/disappearing_server.c
+++ b/test/core/end2end/tests/disappearing_server.c
@@ -52,7 +52,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c b/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c
index 77284b8cbb..6ed0e4e106 100644
--- a/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c
+++ b/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c
@@ -64,7 +64,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/early_server_shutdown_finishes_tags.c b/test/core/end2end/tests/early_server_shutdown_finishes_tags.c
index eb3eb7c07a..88f735c8e0 100644
--- a/test/core/end2end/tests/early_server_shutdown_finishes_tags.c
+++ b/test/core/end2end/tests/early_server_shutdown_finishes_tags.c
@@ -64,7 +64,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c
index cb2d81df2b..fc461250d1 100644
--- a/test/core/end2end/tests/invoke_large_request.c
+++ b/test/core/end2end/tests/invoke_large_request.c
@@ -100,7 +100,7 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->client_cq);
}
-static gpr_slice large_slice() {
+static gpr_slice large_slice(void) {
gpr_slice slice = gpr_slice_malloc(1000000);
memset(GPR_SLICE_START_PTR(slice), 0xab, GPR_SLICE_LENGTH(slice));
return slice;
diff --git a/test/core/end2end/tests/max_concurrent_streams.c b/test/core/end2end/tests/max_concurrent_streams.c
index 09710fe7ed..e88f418cb0 100644
--- a/test/core/end2end/tests/max_concurrent_streams.c
+++ b/test/core/end2end/tests/max_concurrent_streams.c
@@ -64,7 +64,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/no_op.c b/test/core/end2end/tests/no_op.c
index 4039f2baf3..bd4ff06701 100644
--- a/test/core/end2end/tests/no_op.c
+++ b/test/core/end2end/tests/no_op.c
@@ -62,7 +62,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c
index d9c5f48030..03d549a7b4 100644
--- a/test/core/end2end/tests/ping_pong_streaming.c
+++ b/test/core/end2end/tests/ping_pong_streaming.c
@@ -64,7 +64,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c
index 8a0eea8072..f58bf77dfd 100644
--- a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c
+++ b/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c
@@ -64,7 +64,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/request_response_with_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_metadata_and_payload.c
index eb528dd308..09923b2fc5 100644
--- a/test/core/end2end/tests/request_response_with_metadata_and_payload.c
+++ b/test/core/end2end/tests/request_response_with_metadata_and_payload.c
@@ -64,7 +64,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/request_response_with_payload.c b/test/core/end2end/tests/request_response_with_payload.c
index 2f5be04cf5..be65bf1567 100644
--- a/test/core/end2end/tests/request_response_with_payload.c
+++ b/test/core/end2end/tests/request_response_with_payload.c
@@ -64,7 +64,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c
index 95e268441b..d99141e024 100644
--- a/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c
+++ b/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c
@@ -64,7 +64,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/request_with_large_metadata.c b/test/core/end2end/tests/request_with_large_metadata.c
index 26b165625e..e2f554b322 100644
--- a/test/core/end2end/tests/request_with_large_metadata.c
+++ b/test/core/end2end/tests/request_with_large_metadata.c
@@ -64,7 +64,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c
index 602ade6f90..09b3c864fd 100644
--- a/test/core/end2end/tests/request_with_payload.c
+++ b/test/core/end2end/tests/request_with_payload.c
@@ -64,7 +64,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/simple_delayed_request.c b/test/core/end2end/tests/simple_delayed_request.c
index 8a0bf699b1..90ed227749 100644
--- a/test/core/end2end/tests/simple_delayed_request.c
+++ b/test/core/end2end/tests/simple_delayed_request.c
@@ -52,7 +52,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/simple_request.c b/test/core/end2end/tests/simple_request.c
index 909d839e7a..93dfa1fb0a 100644
--- a/test/core/end2end/tests/simple_request.c
+++ b/test/core/end2end/tests/simple_request.c
@@ -64,7 +64,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/end2end/tests/thread_stress.c b/test/core/end2end/tests/thread_stress.c
index c9134a8cc5..5410258201 100644
--- a/test/core/end2end/tests/thread_stress.c
+++ b/test/core/end2end/tests/thread_stress.c
@@ -56,7 +56,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
/* Drain pending events on a completion queue until it's ready to destroy.
Does some post-processing to safely release memory on some of the events. */
@@ -105,7 +105,7 @@ static void drain_cq(int client, grpc_completion_queue *cq) {
}
/* Kick off a new request - assumes g_mu taken */
-static void start_request() {
+static void start_request(void) {
grpc_call *call = grpc_channel_create_call(
g_fixture.client, "/Foo", "test.google.com", g_test_end_time);
g_active_requests++;
@@ -180,7 +180,7 @@ static void client_thread(void *p) {
/* Request a new server call. We tag them with a ref-count that starts at two,
and decrements after each of: a read completes and a write completes.
When it drops to zero, we write status */
-static void request_server_call() {
+static void request_server_call(void) {
gpr_refcount *rc = gpr_malloc(sizeof(gpr_refcount));
gpr_ref_init(rc, 2);
grpc_server_request_call(g_fixture.server, rc);
diff --git a/test/core/end2end/tests/writes_done_hangs_with_pending_read.c b/test/core/end2end/tests/writes_done_hangs_with_pending_read.c
index 5c5e264a21..9878b4ce9a 100644
--- a/test/core/end2end/tests/writes_done_hangs_with_pending_read.c
+++ b/test/core/end2end/tests/writes_done_hangs_with_pending_read.c
@@ -64,7 +64,7 @@ static gpr_timespec n_seconds_time(int n) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(GPR_US_PER_SEC * n));
}
-static gpr_timespec five_seconds_time() { return n_seconds_time(5); }
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event *ev;
diff --git a/test/core/fling/client.c b/test/core/fling/client.c
index cc661c34c5..7e93860dc3 100644
--- a/test/core/fling/client.c
+++ b/test/core/fling/client.c
@@ -50,9 +50,9 @@ static grpc_channel *channel;
static grpc_completion_queue *cq;
static grpc_call *call;
-static void init_ping_pong_request() {}
+static void init_ping_pong_request(void) {}
-static void step_ping_pong_request() {
+static void step_ping_pong_request(void) {
call = grpc_channel_create_call(channel, "/Reflector/reflectUnary",
"localhost", gpr_inf_future);
GPR_ASSERT(grpc_call_start_invoke(call, cq, (void *)1, (void *)1, (void *)1,
@@ -71,7 +71,7 @@ static void step_ping_pong_request() {
call = NULL;
}
-static void init_ping_pong_stream() {
+static void init_ping_pong_stream(void) {
call = grpc_channel_create_call(channel, "/Reflector/reflectStream",
"localhost", gpr_inf_future);
GPR_ASSERT(grpc_call_start_invoke(call, cq, (void *)1, (void *)1, (void *)1,
@@ -80,7 +80,7 @@ static void init_ping_pong_stream() {
grpc_event_finish(grpc_completion_queue_next(cq, gpr_inf_future));
}
-static void step_ping_pong_stream() {
+static void step_ping_pong_stream(void) {
GPR_ASSERT(grpc_call_start_write(call, the_buffer, (void *)1, 0) ==
GRPC_CALL_OK);
GPR_ASSERT(grpc_call_start_read(call, (void *)1) == GRPC_CALL_OK);
@@ -88,7 +88,7 @@ static void step_ping_pong_stream() {
grpc_event_finish(grpc_completion_queue_next(cq, gpr_inf_future));
}
-static double now() {
+static double now(void) {
gpr_timespec tv = gpr_now();
return 1e9 * tv.tv_sec + tv.tv_nsec;
}
diff --git a/test/core/fling/server.c b/test/core/fling/server.c
index 1149d01ea1..705ab3aca2 100644
--- a/test/core/fling/server.c
+++ b/test/core/fling/server.c
@@ -57,7 +57,7 @@ typedef struct {
gpr_uint32 flags;
} call_state;
-static void request_call() {
+static void request_call(void) {
call_state *s = gpr_malloc(sizeof(call_state));
gpr_ref_init(&s->pending_ops, 2);
grpc_server_request_call(server, s);
diff --git a/test/core/httpcli/format_request_test.c b/test/core/httpcli/format_request_test.c
index abda24b44b..ec66f96004 100644
--- a/test/core/httpcli/format_request_test.c
+++ b/test/core/httpcli/format_request_test.c
@@ -38,7 +38,7 @@
#include <grpc/support/log.h>
#include "test/core/util/test_config.h"
-static void test_format_get_request() {
+static void test_format_get_request(void) {
grpc_httpcli_header hdr = {"x-yz", "abc"};
grpc_httpcli_request req;
gpr_slice slice;
@@ -63,7 +63,7 @@ static void test_format_get_request() {
gpr_slice_unref(slice);
}
-static void test_format_post_request() {
+static void test_format_post_request(void) {
grpc_httpcli_header hdr = {"x-yz", "abc"};
grpc_httpcli_request req;
gpr_slice slice;
@@ -93,7 +93,7 @@ static void test_format_post_request() {
gpr_slice_unref(slice);
}
-static void test_format_post_request_no_body() {
+static void test_format_post_request_no_body(void) {
grpc_httpcli_header hdr = {"x-yz", "abc"};
grpc_httpcli_request req;
gpr_slice slice;
@@ -118,7 +118,7 @@ static void test_format_post_request_no_body() {
gpr_slice_unref(slice);
}
-static void test_format_post_request_content_type_override() {
+static void test_format_post_request_content_type_override(void) {
grpc_httpcli_header hdrs[2];
grpc_httpcli_request req;
gpr_slice slice;
diff --git a/test/core/iomgr/alarm_heap_test.c b/test/core/iomgr/alarm_heap_test.c
index eaaaf156f4..abb1086a22 100644
--- a/test/core/iomgr/alarm_heap_test.c
+++ b/test/core/iomgr/alarm_heap_test.c
@@ -40,7 +40,7 @@
#include <grpc/support/log.h>
#include "test/core/util/test_config.h"
-static gpr_timespec random_deadline() {
+static gpr_timespec random_deadline(void) {
gpr_timespec ts;
ts.tv_sec = rand();
ts.tv_nsec = rand();
@@ -150,7 +150,7 @@ static void check_valid(grpc_alarm_heap *pq) {
}
}
-static void test1() {
+static void test1(void) {
grpc_alarm_heap pq;
const int num_test_elements = 200;
const int num_test_operations = 10000;
@@ -206,7 +206,7 @@ static void test1() {
gpr_free(inpq);
}
-static void shrink_test() {
+static void shrink_test(void) {
grpc_alarm_heap pq;
int i;
int expected_size;
diff --git a/test/core/iomgr/alarm_list_test.c b/test/core/iomgr/alarm_list_test.c
index 686d21d705..a250951231 100644
--- a/test/core/iomgr/alarm_list_test.c
+++ b/test/core/iomgr/alarm_list_test.c
@@ -44,13 +44,13 @@
static int cb_called[MAX_CB][2];
static int kicks;
-void grpc_kick_poller() { ++kicks; }
+void grpc_kick_poller(void) { ++kicks; }
static void cb(void *arg, int success) {
cb_called[(gpr_intptr)arg][success]++;
}
-static void add_test() {
+static void add_test(void) {
gpr_timespec start = gpr_now();
int i;
grpc_alarm alarms[20];
@@ -108,7 +108,7 @@ static void add_test() {
}
/* Cleaning up a list with pending alarms. */
-void destruction_test() {
+void destruction_test(void) {
grpc_alarm alarms[5];
grpc_alarm_list_init(gpr_time_0);
diff --git a/test/core/iomgr/alarm_test.c b/test/core/iomgr/alarm_test.c
index 247320de04..aec3a50efc 100644
--- a/test/core/iomgr/alarm_test.c
+++ b/test/core/iomgr/alarm_test.c
@@ -89,7 +89,7 @@ static void alarm_cb(void *arg /* alarm_arg */, int success) {
}
/* Test grpc_alarm add and cancel. */
-static void test_grpc_alarm() {
+static void test_grpc_alarm(void) {
grpc_alarm alarm;
grpc_alarm alarm_to_cancel;
/* Timeout on the alarm cond. var, so make big enough to absorb time
diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c
index 325c9f0221..136f34a8b0 100644
--- a/test/core/iomgr/fd_posix_test.c
+++ b/test/core/iomgr/fd_posix_test.c
@@ -349,7 +349,7 @@ static void client_wait_and_shutdown(client *cl) {
/* Test grpc_fd. Start an upload server and client, upload a stream of
bytes from the client to the server, and verify that the total number of
sent bytes is equal to the total number of received bytes. */
-static void test_grpc_fd() {
+static void test_grpc_fd(void) {
server sv;
client cl;
int port;
@@ -403,7 +403,7 @@ static void second_read_callback(void *arg /* fd_change_data */, int success) {
Note that we have two different but almost identical callbacks above -- the
point is to have two different function pointers and two different data
pointers and make sure that changing both really works. */
-static void test_grpc_fd_change() {
+static void test_grpc_fd_change(void) {
grpc_fd *em_fd;
fd_change_data a, b;
int flags;
diff --git a/test/core/iomgr/resolve_address_test.c b/test/core/iomgr/resolve_address_test.c
index 99e3119581..26a4bc67e6 100644
--- a/test/core/iomgr/resolve_address_test.c
+++ b/test/core/iomgr/resolve_address_test.c
@@ -37,7 +37,7 @@
#include <grpc/support/time.h>
#include "test/core/util/test_config.h"
-static gpr_timespec test_deadline() {
+static gpr_timespec test_deadline(void) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(100000000));
}
@@ -53,35 +53,35 @@ static void must_fail(void* evp, grpc_resolved_addresses* p) {
gpr_event_set(evp, (void*)1);
}
-static void test_localhost() {
+static void test_localhost(void) {
gpr_event ev;
gpr_event_init(&ev);
grpc_resolve_address("localhost:1", NULL, must_succeed, &ev);
GPR_ASSERT(gpr_event_wait(&ev, test_deadline()));
}
-static void test_default_port() {
+static void test_default_port(void) {
gpr_event ev;
gpr_event_init(&ev);
grpc_resolve_address("localhost", "1", must_succeed, &ev);
GPR_ASSERT(gpr_event_wait(&ev, test_deadline()));
}
-static void test_missing_default_port() {
+static void test_missing_default_port(void) {
gpr_event ev;
gpr_event_init(&ev);
grpc_resolve_address("localhost", NULL, must_fail, &ev);
GPR_ASSERT(gpr_event_wait(&ev, test_deadline()));
}
-static void test_ipv6_with_port() {
+static void test_ipv6_with_port(void) {
gpr_event ev;
gpr_event_init(&ev);
grpc_resolve_address("[2001:db8::1]:1", NULL, must_succeed, &ev);
GPR_ASSERT(gpr_event_wait(&ev, test_deadline()));
}
-static void test_ipv6_without_port() {
+static void test_ipv6_without_port(void) {
const char* const kCases[] = {
"2001:db8::1", "2001:db8::1.2.3.4", "[2001:db8::1]",
};
@@ -94,7 +94,7 @@ static void test_ipv6_without_port() {
}
}
-static void test_invalid_ip_addresses() {
+static void test_invalid_ip_addresses(void) {
const char* const kCases[] = {
"293.283.1238.3:1", "[2001:db8::11111]:1",
};
@@ -107,7 +107,7 @@ static void test_invalid_ip_addresses() {
}
}
-static void test_unparseable_hostports() {
+static void test_unparseable_hostports(void) {
const char* const kCases[] = {
"[", "[::1", "[::1]bad", "[1.2.3.4]", "[localhost]", "[localhost]:1",
};
diff --git a/test/core/iomgr/sockaddr_utils_test.c b/test/core/iomgr/sockaddr_utils_test.c
index 8cd9fb660f..14018ed66c 100644
--- a/test/core/iomgr/sockaddr_utils_test.c
+++ b/test/core/iomgr/sockaddr_utils_test.c
@@ -70,7 +70,7 @@ static const gpr_uint8 kIPv4[] = {192, 0, 2, 1};
static const gpr_uint8 kIPv6[] = {0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1};
-static void test_sockaddr_is_v4mapped() {
+static void test_sockaddr_is_v4mapped(void) {
struct sockaddr_in input4;
struct sockaddr_in6 input6;
struct sockaddr_in output4;
@@ -101,7 +101,7 @@ static void test_sockaddr_is_v4mapped() {
!grpc_sockaddr_is_v4mapped((const struct sockaddr *)&input4, NULL));
}
-static void test_sockaddr_to_v4mapped() {
+static void test_sockaddr_to_v4mapped(void) {
struct sockaddr_in input4;
struct sockaddr_in6 input6;
struct sockaddr_in6 output6;
@@ -129,7 +129,7 @@ static void test_sockaddr_to_v4mapped() {
!grpc_sockaddr_to_v4mapped((const struct sockaddr *)&input6, &output6));
}
-static void test_sockaddr_is_wildcard() {
+static void test_sockaddr_is_wildcard(void) {
struct sockaddr_in wild4;
struct sockaddr_in6 wild6;
struct sockaddr_in6 wild_mapped;
@@ -187,7 +187,7 @@ static void expect_sockaddr_str(const char *expected, void *addr,
gpr_free(str);
}
-static void test_sockaddr_to_string() {
+static void test_sockaddr_to_string(void) {
struct sockaddr_in input4;
struct sockaddr_in6 input6;
struct sockaddr dummy;
diff --git a/test/core/iomgr/tcp_client_posix_test.c b/test/core/iomgr/tcp_client_posix_test.c
index 2d0a89a1f5..79ba777e85 100644
--- a/test/core/iomgr/tcp_client_posix_test.c
+++ b/test/core/iomgr/tcp_client_posix_test.c
@@ -43,7 +43,7 @@
#include <grpc/support/log.h>
#include <grpc/support/time.h>
-static gpr_timespec test_deadline() {
+static gpr_timespec test_deadline(void) {
return gpr_time_add(gpr_now(), gpr_time_from_seconds(10));
}
@@ -59,7 +59,7 @@ static void must_fail(void *arg, grpc_endpoint *tcp) {
gpr_event_set(arg, (void *)1);
}
-void test_succeeds() {
+void test_succeeds(void) {
struct sockaddr_in addr;
socklen_t addr_len = sizeof(addr);
int svr_fd;
@@ -94,7 +94,7 @@ void test_succeeds() {
GPR_ASSERT(gpr_event_wait(&ev, test_deadline()));
}
-void test_fails() {
+void test_fails(void) {
struct sockaddr_in addr;
socklen_t addr_len = sizeof(addr);
gpr_event ev;
@@ -112,7 +112,7 @@ void test_fails() {
GPR_ASSERT(gpr_event_wait(&ev, test_deadline()));
}
-void test_times_out() {
+void test_times_out(void) {
struct sockaddr_in addr;
socklen_t addr_len = sizeof(addr);
int svr_fd;
diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c
index 6af3ded98b..182ccba3f6 100644
--- a/test/core/iomgr/tcp_posix_test.c
+++ b/test/core/iomgr/tcp_posix_test.c
@@ -444,7 +444,7 @@ static void write_error_test(ssize_t num_bytes, ssize_t slice_size) {
free(slices);
}
-void run_tests() {
+void run_tests(void) {
int i = 0;
read_test(100, 8192);
@@ -469,7 +469,7 @@ void run_tests() {
}
}
-static void clean_up() {}
+static void clean_up(void) {}
static grpc_endpoint_test_fixture create_fixture_tcp_socketpair(
size_t slice_size) {
diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c
index f30ff917cb..e906f302cf 100644
--- a/test/core/iomgr/tcp_server_posix_test.c
+++ b/test/core/iomgr/tcp_server_posix_test.c
@@ -58,19 +58,19 @@ static void on_connect(void *arg, grpc_endpoint *tcp) {
gpr_mu_unlock(&mu);
}
-static void test_no_op() {
+static void test_no_op(void) {
grpc_tcp_server *s = grpc_tcp_server_create();
grpc_tcp_server_destroy(s);
}
-static void test_no_op_with_start() {
+static void test_no_op_with_start(void) {
grpc_tcp_server *s = grpc_tcp_server_create();
LOG_TEST();
grpc_tcp_server_start(s, NULL, on_connect, NULL);
grpc_tcp_server_destroy(s);
}
-static void test_no_op_with_port() {
+static void test_no_op_with_port(void) {
struct sockaddr_in addr;
grpc_tcp_server *s = grpc_tcp_server_create();
LOG_TEST();
@@ -83,7 +83,7 @@ static void test_no_op_with_port() {
grpc_tcp_server_destroy(s);
}
-static void test_no_op_with_port_and_start() {
+static void test_no_op_with_port_and_start(void) {
struct sockaddr_in addr;
grpc_tcp_server *s = grpc_tcp_server_create();
LOG_TEST();
diff --git a/test/core/iomgr/time_averaged_stats_test.c b/test/core/iomgr/time_averaged_stats_test.c
index 7ed2f84f21..bbfeab5633 100644
--- a/test/core/iomgr/time_averaged_stats_test.c
+++ b/test/core/iomgr/time_averaged_stats_test.c
@@ -41,7 +41,7 @@
#define EXPECT_EQ(a, b) GPR_ASSERT((a) == (b))
#define EXPECT_DOUBLE_EQ(a, b) GPR_ASSERT(fabs((a) - (b)) < 1e-9)
-static void no_regress_no_persist_test_1() {
+static void no_regress_no_persist_test_1(void) {
grpc_time_averaged_stats tas;
grpc_time_averaged_stats_init(&tas, 1000, 0, 0.0);
EXPECT_DOUBLE_EQ(1000, tas.aggregate_weighted_avg);
@@ -59,7 +59,7 @@ static void no_regress_no_persist_test_1() {
EXPECT_DOUBLE_EQ(1, tas.aggregate_total_weight);
}
-static void no_regress_no_persist_test_2() {
+static void no_regress_no_persist_test_2(void) {
grpc_time_averaged_stats tas;
grpc_time_averaged_stats_init(&tas, 1000, 0, 0.0);
EXPECT_DOUBLE_EQ(1000, tas.aggregate_weighted_avg);
@@ -75,7 +75,7 @@ static void no_regress_no_persist_test_2() {
EXPECT_DOUBLE_EQ(1, tas.aggregate_total_weight);
}
-static void no_regress_no_persist_test_3() {
+static void no_regress_no_persist_test_3(void) {
grpc_time_averaged_stats tas;
grpc_time_averaged_stats_init(&tas, 1000, 0, 0.0);
EXPECT_DOUBLE_EQ(1000, tas.aggregate_weighted_avg);
@@ -92,7 +92,7 @@ static void no_regress_no_persist_test_3() {
EXPECT_DOUBLE_EQ(2, tas.aggregate_total_weight);
}
-static void some_regress_no_persist_test() {
+static void some_regress_no_persist_test(void) {
grpc_time_averaged_stats tas;
grpc_time_averaged_stats_init(&tas, 1000, 0.5, 0.0);
EXPECT_DOUBLE_EQ(1000, tas.aggregate_weighted_avg);
@@ -105,7 +105,7 @@ static void some_regress_no_persist_test() {
EXPECT_DOUBLE_EQ(2.5, tas.aggregate_total_weight);
}
-static void some_decay_test() {
+static void some_decay_test(void) {
grpc_time_averaged_stats tas;
grpc_time_averaged_stats_init(&tas, 1000, 1, 0.0);
EXPECT_EQ(1000, tas.aggregate_weighted_avg);
@@ -126,7 +126,7 @@ static void some_decay_test() {
EXPECT_DOUBLE_EQ(2, tas.aggregate_total_weight);
}
-static void no_regress_full_persist_test() {
+static void no_regress_full_persist_test(void) {
grpc_time_averaged_stats tas;
grpc_time_averaged_stats_init(&tas, 1000, 0, 1.0);
EXPECT_DOUBLE_EQ(1000, tas.aggregate_weighted_avg);
@@ -146,7 +146,7 @@ static void no_regress_full_persist_test() {
EXPECT_DOUBLE_EQ(3, tas.aggregate_total_weight);
}
-static void no_regress_some_persist_test() {
+static void no_regress_some_persist_test(void) {
grpc_time_averaged_stats tas;
grpc_time_averaged_stats_init(&tas, 1000, 0, 0.5);
/* Should replace init value */
@@ -162,7 +162,7 @@ static void no_regress_some_persist_test() {
EXPECT_DOUBLE_EQ(2.5, tas.aggregate_total_weight);
}
-static void some_regress_some_persist_test() {
+static void some_regress_some_persist_test(void) {
grpc_time_averaged_stats tas;
grpc_time_averaged_stats_init(&tas, 1000, 0.4, 0.6);
/* Sample weight = 0 */
diff --git a/test/core/network_benchmarks/low_level_ping_pong.c b/test/core/network_benchmarks/low_level_ping_pong.c
index 8a4c1befb6..9a6f518399 100644
--- a/test/core/network_benchmarks/low_level_ping_pong.c
+++ b/test/core/network_benchmarks/low_level_ping_pong.c
@@ -293,7 +293,7 @@ static void print_histogram(gpr_histogram *histogram) {
gpr_histogram_percentile(histogram, 99.9));
}
-static double now() {
+static double now(void) {
gpr_timespec tv = gpr_now();
return 1e9 * tv.tv_sec + tv.tv_nsec;
}
diff --git a/test/core/security/secure_endpoint_test.c b/test/core/security/secure_endpoint_test.c
index d4baa64725..2e23b6a2cd 100644
--- a/test/core/security/secure_endpoint_test.c
+++ b/test/core/security/secure_endpoint_test.c
@@ -125,7 +125,7 @@ secure_endpoint_create_fixture_tcp_socketpair_leftover(size_t slice_size) {
return f;
}
-static void clean_up() {}
+static void clean_up(void) {}
static grpc_endpoint_test_config configs[] = {
{"secure_ep/tcp_socketpair",
diff --git a/test/core/statistics/census_log_tests.c b/test/core/statistics/census_log_tests.c
index 44ad4b9358..6a3c8adcc5 100644
--- a/test/core/statistics/census_log_tests.c
+++ b/test/core/statistics/census_log_tests.c
@@ -114,7 +114,7 @@ static size_t perform_read_iteration(size_t record_size) {
}
/* Asserts that the log is empty. */
-static void assert_log_empty() {
+static void assert_log_empty(void) {
size_t bytes_available;
census_log_init_reader();
GPR_ASSERT(census_log_read_next(&bytes_available) == NULL);
@@ -345,7 +345,7 @@ static void setup_test(int circular_log) {
/* Attempts to create a record of invalid size (size >
CENSUS_LOG_MAX_RECORD_SIZE). */
-void test_invalid_record_size() {
+void test_invalid_record_size(void) {
static const size_t INVALID_SIZE = CENSUS_LOG_MAX_RECORD_SIZE + 1;
static const size_t VALID_SIZE = 1;
void* record;
@@ -368,7 +368,7 @@ void test_invalid_record_size() {
/* Tests end_write() with a different size than what was specified in
start_write(). */
-void test_end_write_with_different_size() {
+void test_end_write_with_different_size(void) {
static const size_t START_WRITE_SIZE = 10;
static const size_t END_WRITE_SIZE = 7;
void* record_written;
@@ -388,7 +388,7 @@ void test_end_write_with_different_size() {
}
/* Verifies that pending records are not available via read_next(). */
-void test_read_pending_record() {
+void test_read_pending_record(void) {
static const size_t PR_RECORD_SIZE = 1024;
size_t bytes_available;
const void* record_read;
@@ -413,7 +413,7 @@ void test_read_pending_record() {
}
/* Tries reading beyond pending write. */
-void test_read_beyond_pending_record() {
+void test_read_beyond_pending_record(void) {
/* Start a write. */
gpr_int32 incomplete_record_size = 10;
gpr_int32 complete_record_size = 20;
@@ -452,7 +452,7 @@ void test_read_beyond_pending_record() {
/* Tests scenario where block being read is detached from a core and put on the
dirty list. */
-void test_detached_while_reading() {
+void test_detached_while_reading(void) {
static const size_t DWR_RECORD_SIZE = 10;
size_t bytes_available;
const void* record_read;
@@ -488,7 +488,7 @@ void test_detached_while_reading() {
/* Fills non-circular log with records sized such that size is a multiple of
CENSUS_LOG_MAX_RECORD_SIZE (no per-block fragmentation). */
-void test_fill_log_no_fragmentation() {
+void test_fill_log_no_fragmentation(void) {
const int circular = 0;
printf("Starting test: fill log no fragmentation\n");
setup_test(circular);
@@ -498,7 +498,7 @@ void test_fill_log_no_fragmentation() {
/* Fills circular log with records sized such that size is a multiple of
CENSUS_LOG_MAX_RECORD_SIZE (no per-block fragmentation). */
-void test_fill_circular_log_no_fragmentation() {
+void test_fill_circular_log_no_fragmentation(void) {
const int circular = 1;
printf("Starting test: fill circular log no fragmentation\n");
setup_test(circular);
@@ -507,7 +507,7 @@ void test_fill_circular_log_no_fragmentation() {
}
/* Fills non-circular log with records that may straddle end of a block. */
-void test_fill_log_with_straddling_records() {
+void test_fill_log_with_straddling_records(void) {
const int circular = 0;
printf("Starting test: fill log with straddling records\n");
setup_test(circular);
@@ -516,7 +516,7 @@ void test_fill_log_with_straddling_records() {
}
/* Fills circular log with records that may straddle end of a block. */
-void test_fill_circular_log_with_straddling_records() {
+void test_fill_circular_log_with_straddling_records(void) {
const int circular = 1;
printf("Starting test: fill circular log with straddling records\n");
setup_test(circular);
@@ -526,7 +526,7 @@ void test_fill_circular_log_with_straddling_records() {
/* Tests scenario where multiple writers and a single reader are using a log
that is configured to discard old records. */
-void test_multiple_writers_circular_log() {
+void test_multiple_writers_circular_log(void) {
const int circular = 1;
printf("Starting test: multiple writers circular log\n");
setup_test(circular);
@@ -536,7 +536,7 @@ void test_multiple_writers_circular_log() {
/* Tests scenario where multiple writers and a single reader are using a log
that is configured to discard old records. */
-void test_multiple_writers() {
+void test_multiple_writers(void) {
const int circular = 0;
printf("Starting test: multiple writers\n");
setup_test(circular);
@@ -545,7 +545,7 @@ void test_multiple_writers() {
}
/* Repeat the straddling records and multiple writers tests with a small log. */
-void test_small_log() {
+void test_small_log(void) {
size_t log_size;
const int circular = 0;
printf("Starting test: small log\n");
@@ -559,7 +559,7 @@ void test_small_log() {
census_log_shutdown();
}
-void test_performance() {
+void test_performance(void) {
int write_size = 1;
for (; write_size < CENSUS_LOG_MAX_RECORD_SIZE; write_size *= 2) {
gpr_timespec write_time;
diff --git a/test/core/statistics/census_stub_test.c b/test/core/statistics/census_stub_test.c
index a86676fbb1..c651eaf21f 100644
--- a/test/core/statistics/census_stub_test.c
+++ b/test/core/statistics/census_stub_test.c
@@ -41,7 +41,7 @@
#include "test/core/util/test_config.h"
/* Tests census noop stubs in a simulated rpc flow */
-void test_census_stubs() {
+void test_census_stubs(void) {
census_op_id op_id;
census_rpc_stats* stats = census_rpc_stats_create_empty();
census_aggregated_rpc_stats data_map = {0, NULL};
diff --git a/test/core/statistics/hash_table_test.c b/test/core/statistics/hash_table_test.c
index 8c76824193..5d05ab5bc4 100644
--- a/test/core/statistics/hash_table_test.c
+++ b/test/core/statistics/hash_table_test.c
@@ -61,7 +61,7 @@ static gpr_uint64 force_collision(const void* k) {
static void free_data(void* data) { gpr_free(data); }
/* Basic tests that empty hash table can be created and destroyed. */
-static void test_create_table() {
+static void test_create_table(void) {
/* Create table with uint64 key type */
census_ht* ht = NULL;
census_ht_option ht_options = {CENSUS_HT_UINT64, 1999, NULL, NULL, NULL,
@@ -81,7 +81,7 @@ static void test_create_table() {
census_ht_destroy(ht);
}
-static void test_table_with_int_key() {
+static void test_table_with_int_key(void) {
census_ht_option opt = {CENSUS_HT_UINT64, 7, NULL, NULL, NULL, NULL};
census_ht* ht = census_ht_create(&opt);
gpr_uint64 i = 0;
@@ -118,7 +118,7 @@ static void test_table_with_int_key() {
}
/* Test that there is no memory leak when keys and values are owned by table. */
-static void test_value_and_key_deleter() {
+static void test_value_and_key_deleter(void) {
census_ht_option opt = {CENSUS_HT_POINTER, 7, &hash64, &cmp_str_keys,
&free_data, &free_data};
census_ht* ht = census_ht_create(&opt);
@@ -148,7 +148,7 @@ static void test_value_and_key_deleter() {
}
/* Test simple insert and erase operations. */
-static void test_simple_add_and_erase() {
+static void test_simple_add_and_erase(void) {
census_ht_option opt = {CENSUS_HT_UINT64, 7, NULL, NULL, NULL, NULL};
census_ht* ht = census_ht_create(&opt);
GPR_ASSERT(ht != NULL);
@@ -183,7 +183,7 @@ static void test_simple_add_and_erase() {
census_ht_destroy(ht);
}
-static void test_insertion_and_deletion_with_high_collision_rate() {
+static void test_insertion_and_deletion_with_high_collision_rate(void) {
census_ht_option opt = {CENSUS_HT_POINTER, 13, &force_collision,
&cmp_str_keys, NULL, NULL};
census_ht* ht = census_ht_create(&opt);
@@ -207,7 +207,7 @@ static void test_insertion_and_deletion_with_high_collision_rate() {
census_ht_destroy(ht);
}
-static void test_table_with_string_key() {
+static void test_table_with_string_key(void) {
census_ht_option opt = {CENSUS_HT_POINTER, 7, &hash64, &cmp_str_keys, NULL,
NULL};
census_ht* ht = census_ht_create(&opt);
@@ -258,7 +258,7 @@ static void test_table_with_string_key() {
census_ht_destroy(ht);
}
-static void test_insertion_with_same_key() {
+static void test_insertion_with_same_key(void) {
census_ht_option opt = {CENSUS_HT_UINT64, 11, NULL, NULL, NULL, NULL};
census_ht* ht = census_ht_create(&opt);
census_ht_key key;
diff --git a/test/core/statistics/rpc_stats_test.c b/test/core/statistics/rpc_stats_test.c
index c101403450..1e929d18ef 100644
--- a/test/core/statistics/rpc_stats_test.c
+++ b/test/core/statistics/rpc_stats_test.c
@@ -45,7 +45,7 @@
#include "test/core/util/test_config.h"
/* Ensure all possible state transitions are called without causing problem */
-static void test_init_shutdown() {
+static void test_init_shutdown(void) {
census_stats_store_init();
census_stats_store_init();
census_stats_store_shutdown();
@@ -53,7 +53,7 @@ static void test_init_shutdown() {
census_stats_store_init();
}
-static void test_create_and_destroy() {
+static void test_create_and_destroy(void) {
census_rpc_stats* stats = NULL;
census_aggregated_rpc_stats agg_stats = {0, NULL};
@@ -80,7 +80,7 @@ static void test_create_and_destroy() {
#define ASSERT_NEAR(a, b) \
GPR_ASSERT((a - b) * (a - b) < 1e-24 * (a + b) * (a + b))
-static void test_record_and_get_stats() {
+static void test_record_and_get_stats(void) {
census_rpc_stats stats = {1, 2, 3, 4, 5.1, 6.2, 7.3, 8.4};
census_op_id id;
census_aggregated_rpc_stats agg_stats = {0, NULL};
@@ -149,7 +149,7 @@ static void test_record_and_get_stats() {
census_shutdown();
}
-static void test_record_stats_on_unknown_op_id() {
+static void test_record_stats_on_unknown_op_id(void) {
census_op_id unknown_id = {0xDEAD, 0xBEEF};
census_rpc_stats stats = {1, 2, 3, 4, 5.1, 6.2, 7.3, 8.4};
census_aggregated_rpc_stats agg_stats = {0, NULL};
@@ -169,7 +169,7 @@ static void test_record_stats_on_unknown_op_id() {
}
/* Test that record stats is noop when trace store is uninitialized. */
-static void test_record_stats_with_trace_store_uninitialized() {
+static void test_record_stats_with_trace_store_uninitialized(void) {
census_rpc_stats stats = {1, 2, 3, 4, 5.1, 6.2, 7.3, 8.4};
census_op_id id = {0, 0};
census_aggregated_rpc_stats agg_stats = {0, NULL};
diff --git a/test/core/statistics/trace_test.c b/test/core/statistics/trace_test.c
index 9a6c54b90f..6eafcf1456 100644
--- a/test/core/statistics/trace_test.c
+++ b/test/core/statistics/trace_test.c
@@ -45,7 +45,7 @@
#include "test/core/util/test_config.h"
/* Ensure all possible state transitions are called without causing problem */
-static void test_init_shutdown() {
+static void test_init_shutdown(void) {
census_tracing_init();
census_tracing_init();
census_tracing_shutdown();
@@ -53,7 +53,7 @@ static void test_init_shutdown() {
census_tracing_init();
}
-static void test_start_op_generates_locally_unique_ids() {
+static void test_start_op_generates_locally_unique_ids(void) {
/* Check that ids generated within window size of 1000 are unique.
TODO(hongyu): Replace O(n^2) duplicate detection algorithm with O(nlogn)
algorithm. Enhance the test to larger window size (>10^6) */
@@ -75,7 +75,7 @@ static void test_start_op_generates_locally_unique_ids() {
census_shutdown();
}
-static void test_get_trace_method_name() {
+static void test_get_trace_method_name(void) {
census_op_id id;
const char write_name[] = "service/method";
census_tracing_init();
@@ -119,7 +119,7 @@ static void mimic_trace_op_sequences(void* arg) {
gpr_mu_unlock(&args->mu);
}
-static void test_concurrency() {
+static void test_concurrency(void) {
#define NUM_THREADS 1000
gpr_thd_id tid[NUM_THREADS];
int i = 0;
@@ -141,7 +141,7 @@ static void test_concurrency() {
#undef NUM_THREADS
}
-static void test_add_method_tag_to_unknown_op_id() {
+static void test_add_method_tag_to_unknown_op_id(void) {
census_op_id unknown_id = {0xDEAD, 0xBEEF};
int ret = 0;
census_tracing_init();
@@ -150,7 +150,7 @@ static void test_add_method_tag_to_unknown_op_id() {
census_tracing_shutdown();
}
-static void test_trace_print() {
+static void test_trace_print(void) {
census_op_id id;
int i;
const char* annotation_txt[4] = {"abc", "", "$%^ *()_"};
diff --git a/test/core/statistics/window_stats_test.c b/test/core/statistics/window_stats_test.c
index 2bf93d8c87..1fe7747740 100644
--- a/test/core/statistics/window_stats_test.c
+++ b/test/core/statistics/window_stats_test.c
@@ -73,7 +73,7 @@ static int compare_double(double a, double b, double epsilon) {
}
}
-void empty_test() {
+void empty_test(void) {
census_window_stats_sums result;
const gpr_timespec zero = {0, 0};
test_stat sum;
@@ -88,7 +88,7 @@ void empty_test() {
census_window_stats_destroy(stats);
}
-void one_interval_test() {
+void one_interval_test(void) {
const test_stat value = {0.1, 4};
const double epsilon = 1e10 - 11;
gpr_timespec when = {0, 0};
@@ -197,7 +197,7 @@ void one_interval_test() {
census_window_stats_destroy(stats);
}
-void many_interval_test() {
+void many_interval_test(void) {
gpr_timespec intervals[4];
const test_stat value = {123.45, 8};
const double epsilon = 1e10 - 11;
@@ -258,7 +258,7 @@ void many_interval_test() {
census_window_stats_destroy(stats);
}
-void rolling_time_test() {
+void rolling_time_test(void) {
const test_stat value = {0.1, 4};
gpr_timespec when = {0, 0};
census_window_stats_sums result;
@@ -282,7 +282,7 @@ void rolling_time_test() {
census_window_stats_destroy(stats);
}
#include <stdio.h>
-void infinite_interval_test() {
+void infinite_interval_test(void) {
const test_stat value = {0.1, 4};
gpr_timespec when = {0, 0};
census_window_stats_sums result;
diff --git a/test/core/support/cmdline_test.c b/test/core/support/cmdline_test.c
index 91035a662b..1d15c66289 100644
--- a/test/core/support/cmdline_test.c
+++ b/test/core/support/cmdline_test.c
@@ -41,7 +41,7 @@
#define LOG_TEST() gpr_log(GPR_INFO, "%s", __FUNCTION__)
-static void test_simple_int() {
+static void test_simple_int(void) {
int x = 1;
gpr_cmdline *cl;
char *args[] = {(char *)__FUNCTION__, "-foo", "3"};
@@ -56,7 +56,7 @@ static void test_simple_int() {
gpr_cmdline_destroy(cl);
}
-static void test_eq_int() {
+static void test_eq_int(void) {
int x = 1;
gpr_cmdline *cl;
char *args[] = {(char *)__FUNCTION__, "-foo=3"};
@@ -71,7 +71,7 @@ static void test_eq_int() {
gpr_cmdline_destroy(cl);
}
-static void test_2dash_int() {
+static void test_2dash_int(void) {
int x = 1;
gpr_cmdline *cl;
char *args[] = {(char *)__FUNCTION__, "--foo", "3"};
@@ -86,7 +86,7 @@ static void test_2dash_int() {
gpr_cmdline_destroy(cl);
}
-static void test_2dash_eq_int() {
+static void test_2dash_eq_int(void) {
int x = 1;
gpr_cmdline *cl;
char *args[] = {(char *)__FUNCTION__, "--foo=3"};
@@ -101,7 +101,7 @@ static void test_2dash_eq_int() {
gpr_cmdline_destroy(cl);
}
-static void test_simple_string() {
+static void test_simple_string(void) {
char *x = NULL;
gpr_cmdline *cl;
char *args[] = {(char *)__FUNCTION__, "-foo", "3"};
@@ -116,7 +116,7 @@ static void test_simple_string() {
gpr_cmdline_destroy(cl);
}
-static void test_eq_string() {
+static void test_eq_string(void) {
char *x = NULL;
gpr_cmdline *cl;
char *args[] = {(char *)__FUNCTION__, "-foo=3"};
@@ -131,7 +131,7 @@ static void test_eq_string() {
gpr_cmdline_destroy(cl);
}
-static void test_2dash_string() {
+static void test_2dash_string(void) {
char *x = NULL;
gpr_cmdline *cl;
char *args[] = {(char *)__FUNCTION__, "--foo", "3"};
@@ -146,7 +146,7 @@ static void test_2dash_string() {
gpr_cmdline_destroy(cl);
}
-static void test_2dash_eq_string() {
+static void test_2dash_eq_string(void) {
char *x = NULL;
gpr_cmdline *cl;
char *args[] = {(char *)__FUNCTION__, "--foo=3"};
@@ -161,7 +161,7 @@ static void test_2dash_eq_string() {
gpr_cmdline_destroy(cl);
}
-static void test_flag_on() {
+static void test_flag_on(void) {
int x = 2;
gpr_cmdline *cl;
char *args[] = {(char *)__FUNCTION__, "--foo"};
@@ -176,7 +176,7 @@ static void test_flag_on() {
gpr_cmdline_destroy(cl);
}
-static void test_flag_no() {
+static void test_flag_no(void) {
int x = 2;
gpr_cmdline *cl;
char *args[] = {(char *)__FUNCTION__, "--no-foo"};
@@ -191,7 +191,7 @@ static void test_flag_no() {
gpr_cmdline_destroy(cl);
}
-static void test_flag_val_1() {
+static void test_flag_val_1(void) {
int x = 2;
gpr_cmdline *cl;
char *args[] = {(char *)__FUNCTION__, "--foo=1"};
@@ -206,7 +206,7 @@ static void test_flag_val_1() {
gpr_cmdline_destroy(cl);
}
-static void test_flag_val_0() {
+static void test_flag_val_0(void) {
int x = 2;
gpr_cmdline *cl;
char *args[] = {(char *)__FUNCTION__, "--foo=0"};
@@ -221,7 +221,7 @@ static void test_flag_val_0() {
gpr_cmdline_destroy(cl);
}
-static void test_flag_val_true() {
+static void test_flag_val_true(void) {
int x = 2;
gpr_cmdline *cl;
char *args[] = {(char *)__FUNCTION__, "--foo=true"};
@@ -236,7 +236,7 @@ static void test_flag_val_true() {
gpr_cmdline_destroy(cl);
}
-static void test_flag_val_false() {
+static void test_flag_val_false(void) {
int x = 2;
gpr_cmdline *cl;
char *args[] = {(char *)__FUNCTION__, "--foo=false"};
@@ -251,7 +251,7 @@ static void test_flag_val_false() {
gpr_cmdline_destroy(cl);
}
-static void test_many() {
+static void test_many(void) {
char *str = NULL;
int x = 0;
int flag = 2;
diff --git a/test/core/support/histogram_test.c b/test/core/support/histogram_test.c
index 3b5fd73047..4769ce0599 100644
--- a/test/core/support/histogram_test.c
+++ b/test/core/support/histogram_test.c
@@ -36,7 +36,7 @@
#define LOG_TEST() gpr_log(GPR_INFO, "%s", __FUNCTION__);
-static void test_no_op() {
+static void test_no_op(void) {
gpr_histogram_destroy(gpr_histogram_create(0.01, 60e9));
}
@@ -49,7 +49,7 @@ static void expect_percentile(gpr_histogram *h, double percentile,
GPR_ASSERT(got <= max_expect);
}
-static void test_simple() {
+static void test_simple(void) {
gpr_histogram *h;
LOG_TEST();
@@ -66,7 +66,7 @@ static void test_simple() {
gpr_histogram_destroy(h);
}
-static void test_percentile() {
+static void test_percentile(void) {
gpr_histogram *h;
double last;
double i;
@@ -111,7 +111,7 @@ static void test_percentile() {
gpr_histogram_destroy(h);
}
-static void test_merge() {
+static void test_merge(void) {
gpr_histogram *h1, *h2;
double last;
double i;
diff --git a/test/core/support/host_port_test.c b/test/core/support/host_port_test.c
index d1553c514e..5b06b7076e 100644
--- a/test/core/support/host_port_test.c
+++ b/test/core/support/host_port_test.c
@@ -48,7 +48,7 @@ static void join_host_port_expect(const char *host, int port,
gpr_free(buf);
}
-static void test_join_host_port() {
+static void test_join_host_port(void) {
join_host_port_expect("foo", 101, "foo:101");
join_host_port_expect("", 102, ":102");
join_host_port_expect("1::2", 103, "[1::2]:103");
@@ -56,7 +56,7 @@ static void test_join_host_port() {
}
/* Garbage in, garbage out. */
-static void test_join_host_port_garbage() {
+static void test_join_host_port_garbage(void) {
join_host_port_expect("[foo]", 105, "[foo]:105");
join_host_port_expect("[::", 106, "[:::106");
join_host_port_expect("::]", 107, "[::]]:107");
diff --git a/test/core/support/slice_test.c b/test/core/support/slice_test.c
index 40440344c0..2a7056feb2 100644
--- a/test/core/support/slice_test.c
+++ b/test/core/support/slice_test.c
@@ -40,7 +40,7 @@
#define LOG_TEST_NAME() gpr_log(GPR_INFO, "%s", __FUNCTION__);
-static void test_slice_malloc_returns_something_sensible() {
+static void test_slice_malloc_returns_something_sensible(void) {
/* Calls gpr_slice_create for various lengths and verifies the internals for
consistency. */
size_t length;
@@ -74,7 +74,7 @@ static void test_slice_malloc_returns_something_sensible() {
static void do_nothing(void *ignored) {}
-static void test_slice_new_returns_something_sensible() {
+static void test_slice_new_returns_something_sensible(void) {
gpr_uint8 x;
gpr_slice slice = gpr_slice_new(&x, 1, do_nothing);
@@ -91,7 +91,7 @@ static void do_nothing_with_len_1(void *ignored, size_t len) {
do_nothing_with_len_1_calls++;
}
-static void test_slice_new_with_len_returns_something_sensible() {
+static void test_slice_new_with_len_returns_something_sensible(void) {
gpr_uint8 x;
gpr_slice slice = gpr_slice_new_with_len(&x, 1, do_nothing_with_len_1);
@@ -198,7 +198,7 @@ static void test_slice_split_tail_works(int length) {
gpr_slice_unref(slice);
}
-static void test_slice_from_copied_string_works() {
+static void test_slice_from_copied_string_works(void) {
static const char *text = "HELLO WORLD!";
gpr_slice slice;
diff --git a/test/core/support/string_test.c b/test/core/support/string_test.c
index 22ae7bacf5..e87a606aba 100644
--- a/test/core/support/string_test.c
+++ b/test/core/support/string_test.c
@@ -44,7 +44,7 @@
#define LOG_TEST_NAME() gpr_log(GPR_INFO, "%s", __FUNCTION__)
-static void test_strdup() {
+static void test_strdup(void) {
static const char *src1 = "hello world";
char *dst1;
@@ -64,7 +64,7 @@ static void expect_hexdump(const char *buf, size_t len, gpr_uint32 flags,
gpr_free(got);
}
-static void test_hexdump() {
+static void test_hexdump(void) {
LOG_TEST_NAME();
expect_hexdump("\x01", 1, 0, "01");
expect_hexdump("\x01", 1, GPR_HEXDUMP_PLAINTEXT, "01 '.'");
@@ -85,7 +85,7 @@ static void test_pu32_succeed(const char *s, gpr_uint32 want) {
GPR_ASSERT(out == want);
}
-static void test_parse_uint32() {
+static void test_parse_uint32(void) {
LOG_TEST_NAME();
test_pu32_fail("-1");
@@ -119,7 +119,7 @@ static void test_parse_uint32() {
test_pu32_fail("4294967299");
}
-static void test_asprintf() {
+static void test_asprintf(void) {
char *buf;
int i, j;
diff --git a/test/core/support/time_test.c b/test/core/support/time_test.c
index d74d6a52d9..56f927787b 100644
--- a/test/core/support/time_test.c
+++ b/test/core/support/time_test.c
@@ -222,7 +222,7 @@ static void test_sticky_infinities(void) {
}
}
-static void test_similar() {
+static void test_similar(void) {
GPR_ASSERT(1 == gpr_time_similar(gpr_inf_future, gpr_inf_future, gpr_time_0));
GPR_ASSERT(1 == gpr_time_similar(gpr_inf_past, gpr_inf_past, gpr_time_0));
GPR_ASSERT(0 == gpr_time_similar(gpr_inf_past, gpr_inf_future, gpr_time_0));
diff --git a/test/core/surface/byte_buffer_reader_test.c b/test/core/surface/byte_buffer_reader_test.c
index bc5a512a0b..d78dd641ad 100644
--- a/test/core/surface/byte_buffer_reader_test.c
+++ b/test/core/surface/byte_buffer_reader_test.c
@@ -46,7 +46,7 @@
#define LOG_TEST() gpr_log(GPR_INFO, "%s", __FUNCTION__)
-static void test_create() {
+static void test_create(void) {
grpc_byte_buffer *buffer;
grpc_byte_buffer_reader *reader;
gpr_slice empty = gpr_empty_slice();
@@ -57,7 +57,7 @@ static void test_create() {
grpc_byte_buffer_destroy(buffer);
}
-static void test_read_one_slice() {
+static void test_read_one_slice(void) {
gpr_slice slice;
grpc_byte_buffer *buffer;
grpc_byte_buffer_reader *reader;
@@ -79,7 +79,7 @@ static void test_read_one_slice() {
grpc_byte_buffer_destroy(buffer);
}
-static void test_read_one_slice_malloc() {
+static void test_read_one_slice_malloc(void) {
gpr_slice slice;
grpc_byte_buffer *buffer;
grpc_byte_buffer_reader *reader;
diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c
index 9be2a67d8d..71f9cc2291 100644
--- a/test/core/surface/completion_queue_test.c
+++ b/test/core/surface/completion_queue_test.c
@@ -47,7 +47,7 @@ static void increment_int_on_finish(void *user_data, grpc_op_error error) {
++*(int *)user_data;
}
-static void *create_test_tag() {
+static void *create_test_tag(void) {
static gpr_intptr i = 0;
return (void *)(++i);
}
@@ -64,12 +64,12 @@ static void shutdown_and_destroy(grpc_completion_queue *cc) {
}
/* ensure we can create and destroy a completion channel */
-static void test_no_op() {
+static void test_no_op(void) {
LOG_TEST();
shutdown_and_destroy(grpc_completion_queue_create());
}
-static void test_wait_empty() {
+static void test_wait_empty(void) {
grpc_completion_queue *cc;
LOG_TEST();
@@ -79,7 +79,7 @@ static void test_wait_empty() {
shutdown_and_destroy(cc);
}
-static void test_cq_end_read() {
+static void test_cq_end_read(void) {
grpc_event *ev;
grpc_completion_queue *cc;
int on_finish_called = 0;
@@ -105,7 +105,7 @@ static void test_cq_end_read() {
shutdown_and_destroy(cc);
}
-static void test_cq_end_invoke_accepted() {
+static void test_cq_end_invoke_accepted(void) {
grpc_event *ev;
grpc_completion_queue *cc;
int on_finish_called = 0;
@@ -131,7 +131,7 @@ static void test_cq_end_invoke_accepted() {
shutdown_and_destroy(cc);
}
-static void test_cq_end_write_accepted() {
+static void test_cq_end_write_accepted(void) {
grpc_event *ev;
grpc_completion_queue *cc;
int on_finish_called = 0;
@@ -157,7 +157,7 @@ static void test_cq_end_write_accepted() {
shutdown_and_destroy(cc);
}
-static void test_cq_end_finish_accepted() {
+static void test_cq_end_finish_accepted(void) {
grpc_event *ev;
grpc_completion_queue *cc;
int on_finish_called = 0;
@@ -183,7 +183,7 @@ static void test_cq_end_finish_accepted() {
shutdown_and_destroy(cc);
}
-static void test_cq_end_client_metadata_read() {
+static void test_cq_end_client_metadata_read(void) {
grpc_event *ev;
grpc_completion_queue *cc;
int on_finish_called = 0;
@@ -210,7 +210,7 @@ static void test_cq_end_client_metadata_read() {
shutdown_and_destroy(cc);
}
-static void test_pluck() {
+static void test_pluck(void) {
grpc_event *ev;
grpc_completion_queue *cc;
void *tags[128];
@@ -273,7 +273,7 @@ typedef struct test_thread_options {
grpc_completion_queue *cc;
} test_thread_options;
-gpr_timespec ten_seconds_time() {
+gpr_timespec ten_seconds_time(void) {
return gpr_time_add(gpr_now(), gpr_time_from_micros(10 * 1000000));
}
diff --git a/test/core/transport/chttp2/hpack_table_test.c b/test/core/transport/chttp2/hpack_table_test.c
index 8810925ba5..1576a30c1b 100644
--- a/test/core/transport/chttp2/hpack_table_test.c
+++ b/test/core/transport/chttp2/hpack_table_test.c
@@ -54,7 +54,7 @@ static void assert_index(const grpc_chttp2_hptbl *tbl, int idx, const char *key,
assert_str(tbl, md->value, value);
}
-static void test_static_lookup() {
+static void test_static_lookup(void) {
grpc_chttp2_hptbl tbl;
grpc_mdctx *mdctx;
@@ -128,7 +128,7 @@ static void test_static_lookup() {
grpc_mdctx_orphan(mdctx);
}
-static void test_many_additions() {
+static void test_many_additions(void) {
grpc_chttp2_hptbl tbl;
int i;
char key[32];
@@ -165,7 +165,7 @@ static grpc_chttp2_hptbl_find_result find_simple(grpc_chttp2_hptbl *tbl,
return r;
}
-static void test_find() {
+static void test_find(void) {
grpc_chttp2_hptbl tbl;
int i;
char buffer[32];
diff --git a/test/core/transport/chttp2/stream_encoder_test.c b/test/core/transport/chttp2/stream_encoder_test.c
index ba552786db..102288f5d7 100644
--- a/test/core/transport/chttp2/stream_encoder_test.c
+++ b/test/core/transport/chttp2/stream_encoder_test.c
@@ -102,7 +102,7 @@ static void assert_result_ok(void *user_data, grpc_op_error error) {
GPR_ASSERT(error == GRPC_OP_OK);
}
-static void test_small_data_framing() {
+static void test_small_data_framing(void) {
grpc_sopb_add_no_op(&g_sopb);
verify_sopb(10, 0, 0, "");
@@ -135,7 +135,7 @@ static void add_sopb_header(const char *key, const char *value) {
grpc_mdelem_from_strings(g_mdctx, key, value));
}
-static void test_basic_headers() {
+static void test_basic_headers(void) {
int i;
add_sopb_header("a", "a");
@@ -183,7 +183,7 @@ static void encode_int_to_str(int i, char *p) {
p[2] = 0;
}
-static void test_decode_table_overflow() {
+static void test_decode_table_overflow(void) {
int i;
char key[3], value[3];
char expect[128];
@@ -282,7 +282,7 @@ static void test_decode_random_headers_inner(int max_len) {
}
#define DECL_TEST_DECODE_RANDOM_HEADERS(n) \
- static void test_decode_random_headers_##n() { \
+ static void test_decode_random_headers_##n(void) { \
test_decode_random_headers_inner(n); \
} \
int keeps_formatting_correct_##n
diff --git a/test/core/transport/chttp2/stream_map_test.c b/test/core/transport/chttp2/stream_map_test.c
index 459ef2aede..9b4446f7f8 100644
--- a/test/core/transport/chttp2/stream_map_test.c
+++ b/test/core/transport/chttp2/stream_map_test.c
@@ -38,7 +38,7 @@
#define LOG_TEST() gpr_log(GPR_INFO, "%s", __FUNCTION__)
/* test creation & destruction */
-static void test_no_op() {
+static void test_no_op(void) {
grpc_chttp2_stream_map map;
LOG_TEST();
@@ -48,7 +48,7 @@ static void test_no_op() {
}
/* test lookup on an empty map */
-static void test_empty_find() {
+static void test_empty_find(void) {
grpc_chttp2_stream_map map;
LOG_TEST();
@@ -59,7 +59,7 @@ static void test_empty_find() {
}
/* test it's safe to delete twice */
-static void test_double_deletion() {
+static void test_double_deletion(void) {
grpc_chttp2_stream_map map;
LOG_TEST();
diff --git a/test/core/transport/chttp2/timeout_encoding_test.c b/test/core/transport/chttp2/timeout_encoding_test.c
index 793d2b945e..4bb84e3f0b 100644
--- a/test/core/transport/chttp2/timeout_encoding_test.c
+++ b/test/core/transport/chttp2/timeout_encoding_test.c
@@ -49,7 +49,7 @@ static void assert_encodes_as(gpr_timespec ts, const char *s) {
GPR_ASSERT(0 == strcmp(buffer, s));
}
-void test_encoding() {
+void test_encoding(void) {
LOG_TEST();
assert_encodes_as(gpr_time_from_micros(-1), "1n");
assert_encodes_as(gpr_time_from_seconds(-10), "1n");
@@ -106,7 +106,7 @@ void decode_suite(char ext, gpr_timespec (*answer)(long x)) {
}
}
-void test_decoding() {
+void test_decoding(void) {
LOG_TEST();
decode_suite('n', gpr_time_from_nanos);
decode_suite('u', gpr_time_from_micros);
@@ -117,7 +117,7 @@ void test_decoding() {
assert_decodes_as("1000000000000000000000u", gpr_inf_future);
}
-void test_decoding_fails() {
+void test_decoding_fails(void) {
gpr_timespec x;
LOG_TEST();
GPR_ASSERT(0 == grpc_chttp2_decode_timeout("", &x));
diff --git a/test/core/transport/metadata_test.c b/test/core/transport/metadata_test.c
index ec424ce144..804096d0e1 100644
--- a/test/core/transport/metadata_test.c
+++ b/test/core/transport/metadata_test.c
@@ -45,7 +45,7 @@
/* a large number */
#define MANY 1000000
-static void test_no_op() {
+static void test_no_op(void) {
grpc_mdctx *ctx;
LOG_TEST();
@@ -54,7 +54,7 @@ static void test_no_op() {
grpc_mdctx_orphan(ctx);
}
-static void test_create_string() {
+static void test_create_string(void) {
grpc_mdctx *ctx;
grpc_mdstr *s1, *s2, *s3;
@@ -74,7 +74,7 @@ static void test_create_string() {
grpc_mdstr_unref(s3);
}
-static void test_create_metadata() {
+static void test_create_metadata(void) {
grpc_mdctx *ctx;
grpc_mdelem *m1, *m2, *m3;
@@ -97,7 +97,7 @@ static void test_create_metadata() {
grpc_mdctx_orphan(ctx);
}
-static void test_create_many_ephemeral_metadata() {
+static void test_create_many_ephemeral_metadata(void) {
grpc_mdctx *ctx;
char buffer[256];
long i;
@@ -118,7 +118,7 @@ static void test_create_many_ephemeral_metadata() {
grpc_mdctx_orphan(ctx);
}
-static void test_create_many_persistant_metadata() {
+static void test_create_many_persistant_metadata(void) {
grpc_mdctx *ctx;
char buffer[256];
long i;
@@ -149,7 +149,7 @@ static void test_create_many_persistant_metadata() {
gpr_free(created);
}
-static void test_spin_creating_the_same_thing() {
+static void test_spin_creating_the_same_thing(void) {
grpc_mdctx *ctx;
LOG_TEST();
@@ -173,7 +173,7 @@ static void test_spin_creating_the_same_thing() {
grpc_mdctx_orphan(ctx);
}
-static void test_things_stick_around() {
+static void test_things_stick_around(void) {
grpc_mdctx *ctx;
int i, j;
char buffer[64];
@@ -220,7 +220,7 @@ static void test_things_stick_around() {
gpr_free(shuf);
}
-static void test_slices_work() {
+static void test_slices_work(void) {
/* ensure no memory leaks when switching representation from mdstr to slice */
grpc_mdctx *ctx;
grpc_mdstr *str;
@@ -245,7 +245,7 @@ static void test_slices_work() {
grpc_mdctx_orphan(ctx);
}
-static void test_base64_and_huffman_works() {
+static void test_base64_and_huffman_works(void) {
grpc_mdctx *ctx;
grpc_mdstr *str;
gpr_slice slice1;
diff --git a/test/core/transport/transport_end2end_tests.c b/test/core/transport/transport_end2end_tests.c
index 86e987bef0..712081bc8a 100644
--- a/test/core/transport/transport_end2end_tests.c
+++ b/test/core/transport/transport_end2end_tests.c
@@ -144,36 +144,36 @@ static gpr_slice alloc_recv_buffer(void *user_data, grpc_transport *transport,
return gpr_slice_malloc(size_hint);
}
-static void pending_ops_cleanup() {
+static void pending_ops_cleanup(void) {
gpr_mu_destroy(&g_mu);
gpr_cv_destroy(&g_cv);
}
-static void pending_ops_init() {
+static void pending_ops_init(void) {
gpr_mu_init(&g_mu);
gpr_cv_init(&g_cv);
atexit(pending_ops_cleanup);
}
-static void use_pending_ops() {
+static void use_pending_ops(void) {
gpr_once_init(&g_pending_ops_init, pending_ops_init);
}
-static void add_pending_op() {
+static void add_pending_op(void) {
use_pending_ops();
gpr_mu_lock(&g_mu);
g_pending_ops++;
gpr_mu_unlock(&g_mu);
}
-static void end_pending_op() {
+static void end_pending_op(void) {
gpr_mu_lock(&g_mu);
g_pending_ops--;
gpr_cv_broadcast(&g_cv);
gpr_mu_unlock(&g_mu);
}
-static void wait_pending_ops() {
+static void wait_pending_ops(void) {
use_pending_ops();
gpr_mu_lock(&g_mu);
while (g_pending_ops > 0) {
diff --git a/test/core/util/grpc_profiler.c b/test/core/util/grpc_profiler.c
index e135743d57..340b2d53b9 100644
--- a/test/core/util/grpc_profiler.c
+++ b/test/core/util/grpc_profiler.c
@@ -35,4 +35,4 @@
void grpc_profiler_start(const char *filename) {}
-void grpc_profiler_stop() {}
+void grpc_profiler_stop(void) {}
diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c
index 5f51478f8c..52008895dc 100644
--- a/test/core/util/port_posix.c
+++ b/test/core/util/port_posix.c
@@ -98,7 +98,7 @@ static int is_port_available(int *port, int is_tcp) {
return 1;
}
-int grpc_pick_unused_port() {
+int grpc_pick_unused_port(void) {
/* We repeatedly pick a port and then see whether or not it is
available for use both as a TCP socket and a UDP socket. First, we
pick a random large port number. For subsequent
@@ -141,7 +141,7 @@ int grpc_pick_unused_port() {
return 0;
}
-int grpc_pick_unused_port_or_die() {
+int grpc_pick_unused_port_or_die(void) {
int port = grpc_pick_unused_port();
GPR_ASSERT(port > 0);
return port;
diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c
index 44ab35fc5e..6df86b593f 100644
--- a/test/core/util/test_config.c
+++ b/test/core/util/test_config.c
@@ -39,7 +39,7 @@
#if GPR_GETPID_IN_UNISTD_H
#include <unistd.h>
-static int seed() { return getpid(); }
+static int seed(void) { return getpid(); }
#endif
#if GPR_GETPID_IN_PROCESS_H