aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-11-16 15:41:56 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-11-16 15:41:56 -0800
commit7851ea37ce81cc3fefdd416977f15cc616e8fa65 (patch)
tree628e870eee57999a193835d057034909828e92cf
parent9fa2ec6de2798398b8622e1af6ff7ec3a571eb0e (diff)
Fixes
-rw-r--r--src/core/lib/iomgr/executor.c6
-rw-r--r--src/core/lib/support/string.c2
-rw-r--r--test/core/end2end/tests/filter_latency.c3
3 files changed, 5 insertions, 6 deletions
diff --git a/src/core/lib/iomgr/executor.c b/src/core/lib/iomgr/executor.c
index 8d7535d6fe..4e78b619fb 100644
--- a/src/core/lib/iomgr/executor.c
+++ b/src/core/lib/iomgr/executor.c
@@ -121,9 +121,8 @@ void grpc_executor_push(grpc_closure *closure, grpc_error *error) {
gpr_mu_unlock(&g_executor.mu);
}
-void grpc_executor_shutdown() {
+void grpc_executor_shutdown(grpc_exec_ctx *exec_ctx) {
int pending_join;
- grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_mu_lock(&g_executor.mu);
pending_join = g_executor.pending_join;
@@ -133,8 +132,7 @@ void grpc_executor_shutdown() {
* list below because we aren't accepting new work */
/* Execute pending callbacks, some may be performing cleanups */
- grpc_exec_ctx_enqueue_list(&exec_ctx, &g_executor.closures, NULL);
- grpc_exec_ctx_finish(&exec_ctx);
+ grpc_exec_ctx_enqueue_list(exec_ctx, &g_executor.closures, NULL);
GPR_ASSERT(grpc_closure_list_empty(g_executor.closures));
if (pending_join) {
gpr_thd_join(g_executor.tid);
diff --git a/src/core/lib/support/string.c b/src/core/lib/support/string.c
index 4db3f9a66c..85b915f118 100644
--- a/src/core/lib/support/string.c
+++ b/src/core/lib/support/string.c
@@ -270,7 +270,7 @@ int gpr_stricmp(const char *a, const char *b) {
static void add_string_to_split(const char *beg, const char *end, char ***strs,
size_t *nstrs, size_t *capstrs) {
char *out = gpr_malloc((size_t)(end - beg) + 1);
- memcpy(out, beg, end - beg);
+ memcpy(out, beg, (size_t)(end - beg));
out[end - beg] = 0;
if (*nstrs == *capstrs) {
*capstrs = GPR_MAX(8, 2 * *capstrs);
diff --git a/test/core/end2end/tests/filter_latency.c b/test/core/end2end/tests/filter_latency.c
index 37ce3b1222..043f12dd9a 100644
--- a/test/core/end2end/tests/filter_latency.c
+++ b/test/core/end2end/tests/filter_latency.c
@@ -314,7 +314,8 @@ static const grpc_channel_filter test_server_filter = {
* Registration
*/
-static bool maybe_add_filter(grpc_channel_stack_builder *builder, void *arg) {
+static bool maybe_add_filter(grpc_exec_ctx *exec_ctx,
+ grpc_channel_stack_builder *builder, void *arg) {
grpc_channel_filter *filter = arg;
if (g_enable_filter) {
// Want to add the filter as close to the end as possible, to make