Fix some type warning
diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c
index b0cc61a..a95929a 100644
--- a/src/core/lib/iomgr/error.c
+++ b/src/core/lib/iomgr/error.c
@@ -30,6 +30,7 @@
#include <grpc/support/log_windows.h>
#endif
+#include "src/core/lib/debug/trace.h"
#include "src/core/lib/iomgr/error_internal.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/slice/slice_internal.h"
diff --git a/src/core/lib/iomgr/ev_epollsig_linux.c b/src/core/lib/iomgr/ev_epollsig_linux.c
index 9508e6f..a822560 100644
--- a/src/core/lib/iomgr/ev_epollsig_linux.c
+++ b/src/core/lib/iomgr/ev_epollsig_linux.c
@@ -49,7 +49,6 @@
#define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker *)1)
-
#define GRPC_POLLING_TRACE(...) \
if (GRPC_TRACER_ON(grpc_polling_trace)) { \
gpr_log(GPR_INFO, __VA_ARGS__); \
@@ -729,8 +728,9 @@
static void ref_by(grpc_fd *fd, int n, const char *reason, const char *file,
int line) {
if (GRPC_TRACER_ON(grpc_trace_fd_refcount)) {
- gpr_log(GPR_DEBUG, "FD %d %p ref %d %ld -> %ld [%s; %s:%d]", fd->fd,
- (void *)fd, n, gpr_atm_no_barrier_load(&fd->refst),
+ gpr_log(GPR_DEBUG,
+ "FD %d %p ref %d %" PRIdPTR " -> %" PRIdPTR " [%s; %s:%d]",
+ fd->fd, (void *)fd, n, gpr_atm_no_barrier_load(&fd->refst),
gpr_atm_no_barrier_load(&fd->refst) + n, reason, file, line);
}
#else
@@ -745,8 +745,9 @@
static void unref_by(grpc_fd *fd, int n, const char *reason, const char *file,
int line) {
if (GRPC_TRACER_ON(grpc_trace_fd_refcount)) {
- gpr_log(GPR_DEBUG, "FD %d %p unref %d %ld -> %ld [%s; %s:%d]", fd->fd,
- (void *)fd, n, gpr_atm_no_barrier_load(&fd->refst),
+ gpr_log(GPR_DEBUG,
+ "FD %d %p unref %d %" PRIdPTR " -> %" PRIdPTR " [%s; %s:%d]",
+ fd->fd, (void *)fd, n, gpr_atm_no_barrier_load(&fd->refst),
gpr_atm_no_barrier_load(&fd->refst) - n, reason, file, line);
}
#else
diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c
index 57d0ca2..8115866 100644
--- a/src/core/lib/iomgr/ev_poll_posix.c
+++ b/src/core/lib/iomgr/ev_poll_posix.c
@@ -290,8 +290,7 @@
#else
static void unref_by(grpc_fd *fd, int n) {
#endif
- gpr_atm old;
- old = gpr_atm_full_fetch_add(&fd->refst, -n);
+ gpr_atm old = gpr_atm_full_fetch_add(&fd->refst, -n);
if (old == n) {
gpr_mu_destroy(&fd->mu);
grpc_iomgr_unregister_object(&fd->iomgr_object);
@@ -1275,7 +1274,6 @@
}
/*******************************************************************************
-
* Condition Variable polling extensions
*/
diff --git a/src/core/lib/iomgr/pollset_uv.c b/src/core/lib/iomgr/pollset_uv.c
index 034b7ff..1a54065 100644
--- a/src/core/lib/iomgr/pollset_uv.c
+++ b/src/core/lib/iomgr/pollset_uv.c
@@ -20,10 +20,6 @@
#ifdef GRPC_UV
-#ifndef NDEBUG
-grpc_tracer_flag grpc_trace_fd_refcount = GRPC_TRACER_INITIALIZER(false);
-#endif
-
#include <uv.h>
#include <string.h>
@@ -35,6 +31,12 @@
#include "src/core/lib/iomgr/pollset.h"
#include "src/core/lib/iomgr/pollset_uv.h"
+#include "src/core/lib/debug/trace.h"
+
+#ifndef NDEBUG
+grpc_tracer_flag grpc_trace_fd_refcount = GRPC_TRACER_INITIALIZER(false);
+#endif
+
struct grpc_pollset {
uv_timer_t timer;
int shutting_down;