aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/statistics
diff options
context:
space:
mode:
authorGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2015-01-30 02:11:35 +0100
committerGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2015-01-30 02:11:35 +0100
commit213ed9185098c543996f2362ea4ee810930f6f5d (patch)
treeec393db8608bde3be050c31252d0e7a230567557 /src/core/statistics
parentc630682ad8c2cf597d1786ec637587678f3c7d6e (diff)
Re-enabling errors on warning, disabling unused parameter warning, and fixing all subsequent errors.
Diffstat (limited to 'src/core/statistics')
-rw-r--r--src/core/statistics/census_log.c4
-rw-r--r--src/core/statistics/census_rpc_stats.c2
-rw-r--r--src/core/statistics/hash_table.c2
-rw-r--r--src/core/statistics/window_stats.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/core/statistics/census_log.c b/src/core/statistics/census_log.c
index 404e92cc62..aea0a33bad 100644
--- a/src/core/statistics/census_log.c
+++ b/src/core/statistics/census_log.c
@@ -173,7 +173,7 @@ typedef struct census_log_core_local_block {
struct census_log {
int discard_old_records;
/* Number of cores (aka hardware-contexts) */
- int num_cores;
+ unsigned num_cores;
/* number of CENSUS_LOG_2_MAX_RECORD_SIZE blocks in log */
gpr_int32 num_blocks;
cl_block* blocks; /* Block metadata. */
@@ -183,7 +183,7 @@ struct census_log {
/* Keeps the state of the reader iterator. A value of 0 indicates that
iterator has reached the end. census_log_init_reader() resets the
value to num_core to restart iteration. */
- gpr_int32 read_iterator_state;
+ gpr_uint32 read_iterator_state;
/* Points to the block being read. If non-NULL, the block is locked for
reading (block_being_read_->reader_lock is held). */
cl_block* block_being_read;
diff --git a/src/core/statistics/census_rpc_stats.c b/src/core/statistics/census_rpc_stats.c
index dd3c07e80b..785c091deb 100644
--- a/src/core/statistics/census_rpc_stats.c
+++ b/src/core/statistics/census_rpc_stats.c
@@ -184,7 +184,7 @@ static void get_stats(census_ht* store, census_aggregated_rpc_stats* data) {
gpr_mu_lock(&g_mu);
if (store != NULL) {
size_t n;
- int i, j;
+ unsigned i, j;
gpr_timespec now = gpr_now();
census_ht_kv* kv = census_ht_get_all_elements(store, &n);
if (kv != NULL) {
diff --git a/src/core/statistics/hash_table.c b/src/core/statistics/hash_table.c
index 1aee86d3a4..1f7c242c72 100644
--- a/src/core/statistics/hash_table.c
+++ b/src/core/statistics/hash_table.c
@@ -292,7 +292,7 @@ static void ht_delete_entry_chain(const census_ht_option* options,
}
void census_ht_destroy(census_ht* ht) {
- int i;
+ unsigned i;
for (i = 0; i < ht->num_buckets; ++i) {
ht_delete_entry_chain(&ht->options, ht->buckets[i].next);
}
diff --git a/src/core/statistics/window_stats.c b/src/core/statistics/window_stats.c
index be53d818a0..42ff02071b 100644
--- a/src/core/statistics/window_stats.c
+++ b/src/core/statistics/window_stats.c
@@ -150,7 +150,7 @@ window_stats* census_window_stats_create(int nintervals,
is->width = size_ns / granularity;
/* Check for possible overflow issues, and maximize interval size if the
user requested something large enough. */
- if (GPR_INT64_MAX - is->width > size_ns) {
+ if ((GPR_INT64_MAX - is->width) > size_ns) {
is->top = size_ns + is->width;
} else {
is->top = GPR_INT64_MAX;