aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/support
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2015-09-29 22:22:36 +0000
committerGravatar Vijay Pai <vpai@google.com>2015-09-29 22:22:36 +0000
commit7b080baf2abd5f826b519760cceb9b8b2174fd15 (patch)
tree58fab26a6ffb4597a3ab2de69fbb2e971d0769f6 /src/core/support
parent3ba6bf57d70e17e8c172dab6f9f352f15cd8b26b (diff)
C changes to avoid shadowed global declaration warnings in gcc4.4
Diffstat (limited to 'src/core/support')
-rw-r--r--src/core/support/time_posix.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/support/time_posix.c b/src/core/support/time_posix.c
index eedfd0a060..78f2c2bb77 100644
--- a/src/core/support/time_posix.c
+++ b/src/core/support/time_posix.c
@@ -52,11 +52,11 @@ static struct timespec timespec_from_gpr(gpr_timespec gts) {
#if _POSIX_TIMERS > 0
static gpr_timespec gpr_from_timespec(struct timespec ts,
- gpr_clock_type clock) {
+ gpr_clock_type clock_type) {
gpr_timespec rv;
rv.tv_sec = ts.tv_sec;
rv.tv_nsec = (int)ts.tv_nsec;
- rv.clock_type = clock;
+ rv.clock_type = clock_type;
return rv;
}
@@ -65,16 +65,16 @@ static clockid_t clockid_for_gpr_clock[] = {CLOCK_MONOTONIC, CLOCK_REALTIME};
void gpr_time_init(void) {}
-gpr_timespec gpr_now(gpr_clock_type clock) {
+gpr_timespec gpr_now(gpr_clock_type clock_type) {
struct timespec now;
- GPR_ASSERT(clock != GPR_TIMESPAN);
- if (clock == GPR_CLOCK_PRECISE) {
+ GPR_ASSERT(clock_type != GPR_TIMESPAN);
+ if (clock_type == GPR_CLOCK_PRECISE) {
gpr_timespec ret;
gpr_precise_clock_now(&ret);
return ret;
} else {
- clock_gettime(clockid_for_gpr_clock[clock], &now);
- return gpr_from_timespec(now, clock);
+ clock_gettime(clockid_for_gpr_clock[clock_type], &now);
+ return gpr_from_timespec(now, clock_type);
}
}
#else