From 3a8360dba86cef472273e8deec71ad4fc4c00f99 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Fri, 19 Jan 2024 13:59:22 -0800 Subject: [PATCH] [Cleanup] safe cast int to void* (#35557) Landing https://github.com/grpc/grpc/pull/34775 Closes #35557 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35557 from veblush:pr-34775 e86a90ee52fa4ac9de85b7e84bec9879b4cf8a8e PiperOrigin-RevId: 599930342 --- src/core/lib/channel/channel_args.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h index 6c8a42ded67..b5bfe25cbfe 100644 --- a/src/core/lib/channel/channel_args.h +++ b/src/core/lib/channel/channel_args.h @@ -326,7 +326,9 @@ class ChannelArgs { class Value { public: - explicit Value(int n) : rep_(reinterpret_cast(n), &int_vtable_) {} + explicit Value(int n) + : rep_(reinterpret_cast(static_cast(n)), + &int_vtable_) {} explicit Value(std::string s) : rep_(RefCountedString::Make(s).release(), &string_vtable_) {} explicit Value(Pointer p) : rep_(std::move(p)) {}