From 64db1580f891f9b89e1653804a3f20a1a979a8f9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 23 Sep 2015 10:09:21 -0700 Subject: [PATCH 1/2] Remove workqueue_test from Windows for now --- build.yaml | 3 +- tools/run_tests/tests.json | 10 +- vsprojects/buildtests_c.sln | 27 --- .../workqueue_test/workqueue_test.vcxproj | 176 ------------------ .../workqueue_test.vcxproj.filters | 21 --- 5 files changed, 8 insertions(+), 229 deletions(-) delete mode 100644 vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj.filters diff --git a/build.yaml b/build.yaml index 01754dd40ea..374ad382b44 100644 --- a/build.yaml +++ b/build.yaml @@ -742,7 +742,7 @@ targets: language: c src: [test/core/iomgr/udp_server_test.c] deps: [grpc_test_util, grpc, gpr_test_util, gpr] - platforms: [posix] + platforms: [mac, linux, posix] - name: uri_parser_test build: test language: c @@ -753,6 +753,7 @@ targets: language: c src: [test/core/iomgr/workqueue_test.c] deps: [grpc_test_util, grpc, gpr_test_util, gpr] + platforms: [mac, linux, posix] - name: async_end2end_test build: test language: c++ diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index d96e4662d1e..5f4d4d4ebd0 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1151,6 +1151,8 @@ }, { "ci_platforms": [ + "linux", + "mac", "posix" ], "exclude_configs": [], @@ -1158,6 +1160,8 @@ "language": "c", "name": "udp_server_test", "platforms": [ + "linux", + "mac", "posix" ] }, @@ -1183,8 +1187,7 @@ "ci_platforms": [ "linux", "mac", - "posix", - "windows" + "posix" ], "exclude_configs": [], "flaky": false, @@ -1193,8 +1196,7 @@ "platforms": [ "linux", "mac", - "posix", - "windows" + "posix" ] }, { diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index ae5aaaa02f0..24b51d460d6 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -1237,17 +1237,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "uri_parser_test", "vcxproj\ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "workqueue_test", "vcxproj\test\workqueue_test\workqueue_test.vcxproj", "{1B6E9651-4D88-2ACB-BEE0-26599919361D}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_compress_bad_hostname_test", "vcxproj\test\h2_compress_bad_hostname_test\h2_compress_bad_hostname_test.vcxproj", "{CB29C8C8-0EF3-843F-2E56-36E076A57D0C}" ProjectSection(myProperties) = preProject lib = "False" @@ -9800,22 +9789,6 @@ Global {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Release-DLL|Win32.Build.0 = Release|Win32 {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Release-DLL|x64.ActiveCfg = Release|x64 {E35C24A0-8725-E773-FE78-CC0C67071EF7}.Release-DLL|x64.Build.0 = Release|x64 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug|Win32.ActiveCfg = Debug|Win32 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug|x64.ActiveCfg = Debug|x64 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release|Win32.ActiveCfg = Release|Win32 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release|x64.ActiveCfg = Release|x64 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug|Win32.Build.0 = Debug|Win32 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug|x64.Build.0 = Debug|x64 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release|Win32.Build.0 = Release|Win32 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release|x64.Build.0 = Release|x64 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug-DLL|x64.Build.0 = Debug|x64 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release-DLL|Win32.Build.0 = Release|Win32 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release-DLL|x64.ActiveCfg = Release|x64 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release-DLL|x64.Build.0 = Release|x64 {CB29C8C8-0EF3-843F-2E56-36E076A57D0C}.Debug|Win32.ActiveCfg = Debug|Win32 {CB29C8C8-0EF3-843F-2E56-36E076A57D0C}.Debug|x64.ActiveCfg = Debug|x64 {CB29C8C8-0EF3-843F-2E56-36E076A57D0C}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj b/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj deleted file mode 100644 index 750ef94b902..00000000000 --- a/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {1B6E9651-4D88-2ACB-BEE0-26599919361D} - - - - v100 - - - v110 - - - v120 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - workqueue_test - static - Debug - Debug - - - workqueue_test - static - Debug - Debug - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - - - Console - true - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - - - Console - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) - true - MultiThreaded - true - - - Console - true - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreaded - true - - - Console - true - true - true - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj.filters b/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj.filters deleted file mode 100644 index 8b8c22896d8..00000000000 --- a/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\iomgr - - - - - - {3c17ce2b-b57b-9278-8494-48ab4df88ec8} - - - {7035b4d7-88e6-ce95-0011-0ea3cc64eddd} - - - {f0fb09d4-0bdc-a53c-1b5f-d71acbf72a5d} - - - - From 565b18b69c4fa112ef87b85cb4be1c4945a75831 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 23 Sep 2015 10:09:42 -0700 Subject: [PATCH 2/2] clang-format all core files --- src/core/client_config/subchannel.c | 14 +++++++------- src/core/iomgr/exec_ctx.h | 4 ++-- src/core/iomgr/iocp_windows.c | 6 ++---- src/core/iomgr/iocp_windows.h | 4 ++-- src/core/iomgr/pollset_set_windows.c | 4 ++-- src/core/iomgr/pollset_windows.c | 6 +++--- src/core/iomgr/sockaddr_utils.c | 3 ++- src/core/iomgr/tcp_client_windows.c | 5 +++-- src/core/iomgr/tcp_server_windows.c | 8 ++++---- src/core/iomgr/tcp_windows.c | 18 ++++++++---------- src/core/security/security_connector.c | 8 ++++---- src/core/support/stack_lockfree.c | 2 +- src/core/surface/server.c | 6 +++--- src/core/surface/version.c | 4 +--- test/core/util/port_windows.c | 9 ++++++--- 15 files changed, 50 insertions(+), 51 deletions(-) diff --git a/src/core/client_config/subchannel.c b/src/core/client_config/subchannel.c index d9dc5ae39d5..740389003a5 100644 --- a/src/core/client_config/subchannel.c +++ b/src/core/client_config/subchannel.c @@ -258,7 +258,7 @@ static void subchannel_destroy(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { if (c->active != NULL) { connection_destroy(exec_ctx, c->active); } - gpr_free((void*)c->filters); + gpr_free((void *)c->filters); grpc_channel_args_destroy(c->args); gpr_free(c->addr); grpc_mdctx_unref(c->mdctx); @@ -294,7 +294,7 @@ grpc_subchannel *grpc_subchannel_create(grpc_connector *connector, grpc_connector_ref(c->connector); c->num_filters = args->filter_count; c->filters = gpr_malloc(sizeof(grpc_channel_filter *) * c->num_filters); - memcpy((void*)c->filters, args->filters, + memcpy((void *)c->filters, args->filters, sizeof(grpc_channel_filter *) * c->num_filters); c->addr = gpr_malloc(args->addr_len); memcpy(c->addr, args->addr, args->addr_len); @@ -531,8 +531,8 @@ static void publish_transport(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { /* build final filter list */ num_filters = c->num_filters + c->connecting_result.num_filters + 1; filters = gpr_malloc(sizeof(*filters) * num_filters); - memcpy((void*)filters, c->filters, sizeof(*filters) * c->num_filters); - memcpy((void*)(filters + c->num_filters), c->connecting_result.filters, + memcpy((void *)filters, c->filters, sizeof(*filters) * c->num_filters); + memcpy((void *)(filters + c->num_filters), c->connecting_result.filters, sizeof(*filters) * c->connecting_result.num_filters); filters[num_filters - 1] = &grpc_connected_channel_filter; @@ -545,7 +545,7 @@ static void publish_transport(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { grpc_channel_stack_init(exec_ctx, filters, num_filters, c->master, c->args, c->mdctx, stk); grpc_connected_channel_bind_transport(stk, c->connecting_result.transport); - gpr_free((void*)c->connecting_result.filters); + gpr_free((void *)c->connecting_result.filters); memset(&c->connecting_result, 0, sizeof(c->connecting_result)); /* initialize state watcher */ @@ -559,7 +559,7 @@ static void publish_transport(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { if (c->disconnected) { gpr_mu_unlock(&c->mu); gpr_free(sw); - gpr_free((void*)filters); + gpr_free((void *)filters); grpc_channel_stack_destroy(exec_ctx, stk); GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, c->master, "connecting"); GRPC_SUBCHANNEL_UNREF(exec_ctx, c, "connecting"); @@ -601,7 +601,7 @@ static void publish_transport(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { w4c = next; } - gpr_free((void*)filters); + gpr_free((void *)filters); if (destroy_connection != NULL) { connection_destroy(exec_ctx, destroy_connection); diff --git a/src/core/iomgr/exec_ctx.h b/src/core/iomgr/exec_ctx.h index bfa08c41dd7..f99aa038c59 100644 --- a/src/core/iomgr/exec_ctx.h +++ b/src/core/iomgr/exec_ctx.h @@ -38,7 +38,7 @@ /** Execution context. * A bag of data that collects information along a callstack. - * Generally created at public API entry points, and passed down as + * Generally created at public API entry points, and passed down as * pointer to child functions that manipulate it. * * Specific responsibilities (this may grow in the future): @@ -48,7 +48,7 @@ * * CONVENTIONS: * Instance of this must ALWAYS be constructed on the stack, never - * heap allocated. Instances and pointers to them must always be called + * heap allocated. Instances and pointers to them must always be called * exec_ctx. Instances are always passed as the first argument * to a function that takes it, and always as a pointer (grpc_exec_ctx * is never copied). diff --git a/src/core/iomgr/iocp_windows.c b/src/core/iomgr/iocp_windows.c index 0378cf0c765..3556b2c301b 100644 --- a/src/core/iomgr/iocp_windows.c +++ b/src/core/iomgr/iocp_windows.c @@ -169,8 +169,7 @@ void grpc_iocp_add_socket(grpc_winsocket *socket) { the callback now. -) The IOCP hasn't completed yet, and we're queuing it for later. */ static void socket_notify_on_iocp(grpc_exec_ctx *exec_ctx, - grpc_winsocket *socket, - grpc_closure *closure, + grpc_winsocket *socket, grpc_closure *closure, grpc_winsocket_callback_info *info) { int run_now = 0; GPR_ASSERT(info->closure == NULL); @@ -191,8 +190,7 @@ void grpc_socket_notify_on_write(grpc_exec_ctx *exec_ctx, socket_notify_on_iocp(exec_ctx, socket, closure, &socket->write_info); } -void grpc_socket_notify_on_read(grpc_exec_ctx *exec_ctx, - grpc_winsocket *socket, +void grpc_socket_notify_on_read(grpc_exec_ctx *exec_ctx, grpc_winsocket *socket, grpc_closure *closure) { socket_notify_on_iocp(exec_ctx, socket, closure, &socket->read_info); } diff --git a/src/core/iomgr/iocp_windows.h b/src/core/iomgr/iocp_windows.h index 35c418f3b45..b0209e04e33 100644 --- a/src/core/iomgr/iocp_windows.h +++ b/src/core/iomgr/iocp_windows.h @@ -44,11 +44,11 @@ void grpc_iocp_shutdown(void); void grpc_iocp_add_socket(grpc_winsocket *); void grpc_socket_notify_on_write(grpc_exec_ctx *exec_ctx, - grpc_winsocket *winsocket, + grpc_winsocket *winsocket, grpc_closure *closure); void grpc_socket_notify_on_read(grpc_exec_ctx *exec_ctx, - grpc_winsocket *winsocket, + grpc_winsocket *winsocket, grpc_closure *closure); #endif /* GRPC_INTERNAL_CORE_IOMGR_IOCP_WINDOWS_H */ diff --git a/src/core/iomgr/pollset_set_windows.c b/src/core/iomgr/pollset_set_windows.c index 75da6dbfa1e..53d5d3dcd47 100644 --- a/src/core/iomgr/pollset_set_windows.c +++ b/src/core/iomgr/pollset_set_windows.c @@ -41,11 +41,11 @@ void grpc_pollset_set_init(grpc_pollset_set* pollset_set) {} void grpc_pollset_set_destroy(grpc_pollset_set* pollset_set) {} -void grpc_pollset_set_add_pollset(grpc_exec_ctx *exec_ctx, +void grpc_pollset_set_add_pollset(grpc_exec_ctx* exec_ctx, grpc_pollset_set* pollset_set, grpc_pollset* pollset) {} -void grpc_pollset_set_del_pollset(grpc_exec_ctx *exec_ctx, +void grpc_pollset_set_del_pollset(grpc_exec_ctx* exec_ctx, grpc_pollset_set* pollset_set, grpc_pollset* pollset) {} diff --git a/src/core/iomgr/pollset_windows.c b/src/core/iomgr/pollset_windows.c index 7707c3d502b..5e835743af4 100644 --- a/src/core/iomgr/pollset_windows.c +++ b/src/core/iomgr/pollset_windows.c @@ -98,9 +98,9 @@ void grpc_pollset_destroy(grpc_pollset *pollset) { gpr_mu_destroy(&pollset->mu); } -void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_pollset_worker *worker, - gpr_timespec now, gpr_timespec deadline) { +void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_pollset_worker *worker, gpr_timespec now, + gpr_timespec deadline) { int added_worker = 0; worker->next = worker->prev = NULL; gpr_cv_init(&worker->cv); diff --git a/src/core/iomgr/sockaddr_utils.c b/src/core/iomgr/sockaddr_utils.c index df74fe2fe04..511a5d5c590 100644 --- a/src/core/iomgr/sockaddr_utils.c +++ b/src/core/iomgr/sockaddr_utils.c @@ -160,7 +160,8 @@ int grpc_sockaddr_to_string(char **out, const struct sockaddr *addr, } /* Windows inet_ntop wants a mutable ip pointer */ if (ip != NULL && - inet_ntop(addr->sa_family, (void*)ip, ntop_buf, sizeof(ntop_buf)) != NULL) { + inet_ntop(addr->sa_family, (void *)ip, ntop_buf, sizeof(ntop_buf)) != + NULL) { ret = gpr_join_host_port(out, ntop_buf, port); } else { ret = gpr_asprintf(out, "(sockaddr family=%d)", addr->sa_family); diff --git a/src/core/iomgr/tcp_client_windows.c b/src/core/iomgr/tcp_client_windows.c index 15fe30fb72b..3540c556764 100644 --- a/src/core/iomgr/tcp_client_windows.c +++ b/src/core/iomgr/tcp_client_windows.c @@ -120,7 +120,7 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *acp, int from_iocp) { /* Tries to issue one async connection, then schedules both an IOCP notification request for the connection, and one timeout alert. */ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, - grpc_endpoint **endpoint, + grpc_endpoint **endpoint, grpc_pollset_set *interested_parties, const struct sockaddr *addr, size_t addr_len, gpr_timespec deadline) { @@ -179,7 +179,8 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, socket = grpc_winsocket_create(sock, "client"); info = &socket->write_info; - success = ConnectEx(sock, addr, (int)addr_len, NULL, 0, NULL, &info->overlapped); + success = + ConnectEx(sock, addr, (int)addr_len, NULL, 0, NULL, &info->overlapped); /* It wouldn't be unusual to get a success immediately. But we'll still get an IOCP notification, so let's ignore it. */ diff --git a/src/core/iomgr/tcp_server_windows.c b/src/core/iomgr/tcp_server_windows.c index 55cd1a5d6eb..7244606e98c 100644 --- a/src/core/iomgr/tcp_server_windows.c +++ b/src/core/iomgr/tcp_server_windows.c @@ -198,7 +198,8 @@ error: return -1; } -static void decrement_active_ports_and_notify(grpc_exec_ctx *exec_ctx, server_port *sp) { +static void decrement_active_ports_and_notify(grpc_exec_ctx *exec_ctx, + server_port *sp) { int notify = 0; sp->shutting_down = 0; gpr_mu_lock(&sp->server->mu); @@ -458,9 +459,8 @@ grpc_tcp_server_get_socket(grpc_tcp_server *s, unsigned index) { return (index < s->nports) ? s->ports[index].socket->socket : INVALID_SOCKET; } -void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, - grpc_pollset **pollset, - size_t pollset_count, +void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, + grpc_pollset **pollset, size_t pollset_count, grpc_tcp_server_cb on_accept_cb, void *on_accept_cb_arg) { size_t i; diff --git a/src/core/iomgr/tcp_windows.c b/src/core/iomgr/tcp_windows.c index 4a531b8546c..2962762679d 100644 --- a/src/core/iomgr/tcp_windows.c +++ b/src/core/iomgr/tcp_windows.c @@ -176,10 +176,8 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, int success) { } } -static void win_read(grpc_exec_ctx *exec_ctx, - grpc_endpoint *ep, - gpr_slice_buffer *read_slices, - grpc_closure *cb) { +static void win_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, + gpr_slice_buffer *read_slices, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; grpc_winsocket *handle = tcp->socket; grpc_winsocket_callback_info *info = &handle->read_info; @@ -264,10 +262,8 @@ static void on_write(grpc_exec_ctx *exec_ctx, void *tcpp, int success) { } /* Initiates a write. */ -static void win_write(grpc_exec_ctx *exec_ctx, - grpc_endpoint *ep, - gpr_slice_buffer *slices, - grpc_closure *cb) { +static void win_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, + gpr_slice_buffer *slices, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; grpc_winsocket *socket = tcp->socket; grpc_winsocket_callback_info *info = &socket->write_info; @@ -344,14 +340,16 @@ static void win_write(grpc_exec_ctx *exec_ctx, grpc_socket_notify_on_write(exec_ctx, socket, &tcp->on_write); } -static void win_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, grpc_pollset *ps) { +static void win_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, + grpc_pollset *ps) { grpc_tcp *tcp; (void)ps; tcp = (grpc_tcp *)ep; grpc_iocp_add_socket(tcp->socket); } -static void win_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, grpc_pollset_set *pss) { +static void win_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, + grpc_pollset_set *pss) { grpc_tcp *tcp; (void)pss; tcp = (grpc_tcp *)ep; diff --git a/src/core/security/security_connector.c b/src/core/security/security_connector.c index ea07d49acb3..7c4cf6f04d6 100644 --- a/src/core/security/security_connector.c +++ b/src/core/security/security_connector.c @@ -648,12 +648,12 @@ grpc_security_status grpc_ssl_channel_security_connector_create( goto error; } *sc = &c->base; - gpr_free((void*)alpn_protocol_strings); + gpr_free((void *)alpn_protocol_strings); gpr_free(alpn_protocol_string_lengths); return GRPC_SECURITY_OK; error: - gpr_free((void*)alpn_protocol_strings); + gpr_free((void *)alpn_protocol_strings); gpr_free(alpn_protocol_string_lengths); return GRPC_SECURITY_ERROR; } @@ -703,12 +703,12 @@ grpc_security_status grpc_ssl_server_security_connector_create( goto error; } *sc = &c->base; - gpr_free((void*)alpn_protocol_strings); + gpr_free((void *)alpn_protocol_strings); gpr_free(alpn_protocol_string_lengths); return GRPC_SECURITY_OK; error: - gpr_free((void*)alpn_protocol_strings); + gpr_free((void *)alpn_protocol_strings); gpr_free(alpn_protocol_string_lengths); return GRPC_SECURITY_ERROR; } diff --git a/src/core/support/stack_lockfree.c b/src/core/support/stack_lockfree.c index 7e6beec0c24..df9a09894c6 100644 --- a/src/core/support/stack_lockfree.c +++ b/src/core/support/stack_lockfree.c @@ -67,7 +67,7 @@ typedef union lockfree_node { #define ENTRY_ALIGNMENT_BITS 3 /* make sure that entries aligned to 8-bytes */ #define INVALID_ENTRY_INDEX \ ((1 << 16) - 1) /* reserve this entry as invalid \ - */ + */ struct gpr_stack_lockfree { lockfree_node *entries; diff --git a/src/core/surface/server.c b/src/core/surface/server.c index 28d0e8938d3..b6d33066a98 100644 --- a/src/core/surface/server.c +++ b/src/core/surface/server.c @@ -183,7 +183,7 @@ typedef struct { struct grpc_server { size_t channel_filter_count; - grpc_channel_filter const**channel_filters; + grpc_channel_filter const **channel_filters; grpc_channel_args *channel_args; grpc_completion_queue **cqs; @@ -356,7 +356,7 @@ static void server_delete(grpc_exec_ctx *exec_ctx, grpc_server *server) { grpc_channel_args_destroy(server->channel_args); gpr_mu_destroy(&server->mu_global); gpr_mu_destroy(&server->mu_call); - gpr_free((void*)server->channel_filters); + gpr_free((void *)server->channel_filters); while ((rm = server->registered_methods) != NULL) { server->registered_methods = rm->next; request_matcher_destroy(&rm->request_matcher); @@ -988,7 +988,7 @@ void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *s, chand->next->prev = chand->prev->next = chand; gpr_mu_unlock(&s->mu_global); - gpr_free((void*)filters); + gpr_free((void *)filters); GRPC_CHANNEL_INTERNAL_REF(channel, "connectivity"); memset(&op, 0, sizeof(op)); diff --git a/src/core/surface/version.c b/src/core/surface/version.c index 4b90e06a043..e559d51448a 100644 --- a/src/core/surface/version.c +++ b/src/core/surface/version.c @@ -36,6 +36,4 @@ #include -const char *grpc_version_string(void) { - return "0.11.0.0"; -} +const char *grpc_version_string(void) { return "0.11.0.0"; } diff --git a/test/core/util/port_windows.c b/test/core/util/port_windows.c index 3d2567757a8..60ad9b4f2ae 100644 --- a/test/core/util/port_windows.c +++ b/test/core/util/port_windows.c @@ -151,7 +151,8 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, gpr_mu_unlock(GRPC_POLLSET_MU(&pr->pollset)); } -static void destroy_pollset_and_shutdown(grpc_exec_ctx *exec_ctx, void *p, int success) { +static void destroy_pollset_and_shutdown(grpc_exec_ctx *exec_ctx, void *p, + int success) { grpc_pollset_destroy(p); grpc_shutdown(); } @@ -180,7 +181,8 @@ static int pick_port_using_server(char *server) { gpr_mu_lock(GRPC_POLLSET_MU(&pr.pollset)); while (pr.port == -1) { grpc_pollset_worker worker; - grpc_pollset_work(&exec_ctx, &pr.pollset, &worker, gpr_now(GPR_CLOCK_MONOTONIC), + grpc_pollset_work(&exec_ctx, &pr.pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); gpr_mu_unlock(GRPC_POLLSET_MU(&pr.pollset)); grpc_exec_ctx_flush(&exec_ctx); @@ -189,7 +191,8 @@ static int pick_port_using_server(char *server) { gpr_mu_unlock(GRPC_POLLSET_MU(&pr.pollset)); grpc_httpcli_context_destroy(&context); - grpc_closure_init(&destroy_pollset_closure, destroy_pollset_and_shutdown, &pr.pollset); + grpc_closure_init(&destroy_pollset_closure, destroy_pollset_and_shutdown, + &pr.pollset); grpc_pollset_shutdown(&exec_ctx, &pr.pollset, &destroy_pollset_closure); grpc_exec_ctx_finish(&exec_ctx);