From 8b597ad5ba1434db81df33d587b2218ebfc3944a Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 30 Oct 2019 22:05:43 -0700 Subject: [PATCH 1/2] Change unused parameter name comment to cast --- src/core/lib/iomgr/buffer_list.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/buffer_list.cc b/src/core/lib/iomgr/buffer_list.cc index f2691b0826a..ed9dd64c44e 100644 --- a/src/core/lib/iomgr/buffer_list.cc +++ b/src/core/lib/iomgr/buffer_list.cc @@ -294,7 +294,11 @@ void grpc_tcp_set_write_timestamps_callback(void (*fn)(void*, namespace grpc_core { void grpc_tcp_set_write_timestamps_callback( - void (*/*fn*/)(void*, grpc_core::Timestamps*, grpc_error* error)) { + void (*fn)(void*, grpc_core::Timestamps*, grpc_error* error)) { + // Cast value of fn to void to avoid unused parameter warning. + // Can't comment out the name because some compilers and formatters don't + // like the sequence */* , which would arise from */*fn*/. + (void)fn; gpr_log(GPR_DEBUG, "Timestamps callback is not enabled for this platform"); } } /* namespace grpc_core */ From 7b9349de049878df17efda0694032297f02ef524 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 30 Oct 2019 22:29:03 -0700 Subject: [PATCH 2/2] clang-format --- src/core/lib/iomgr/buffer_list.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/lib/iomgr/buffer_list.cc b/src/core/lib/iomgr/buffer_list.cc index ed9dd64c44e..722e9036b32 100644 --- a/src/core/lib/iomgr/buffer_list.cc +++ b/src/core/lib/iomgr/buffer_list.cc @@ -293,8 +293,9 @@ void grpc_tcp_set_write_timestamps_callback(void (*fn)(void*, #else /* GRPC_LINUX_ERRQUEUE */ namespace grpc_core { -void grpc_tcp_set_write_timestamps_callback( - void (*fn)(void*, grpc_core::Timestamps*, grpc_error* error)) { +void grpc_tcp_set_write_timestamps_callback(void (*fn)(void*, + grpc_core::Timestamps*, + grpc_error* error)) { // Cast value of fn to void to avoid unused parameter warning. // Can't comment out the name because some compilers and formatters don't // like the sequence */* , which would arise from */*fn*/.