diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c
index 830795fc785d4fd371b3104410859319563ab238..eef315bead669612717750bf1ef5d79849a8eb2a 100644
--- a/src/core/lib/surface/call.c
+++ b/src/core/lib/surface/call.c
@@ -859,7 +859,8 @@ static void recv_common_filter(grpc_exec_ctx *exec_ctx, grpc_call *call,
         status_code == GRPC_STATUS_OK
             ? GRPC_ERROR_NONE
             : grpc_error_set_int(GRPC_ERROR_CREATE("Error received from peer"),
-                                 GRPC_ERROR_INT_GRPC_STATUS, status_code);
+                                 GRPC_ERROR_INT_GRPC_STATUS,
+                                 (intptr_t)status_code);
 
     if (b->idx.named.grpc_message != NULL) {
       char *msg =