aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-11-02 15:44:26 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-11-02 15:44:26 +0100
commit837e940627cd8dc469e65980b3b48c9539a55440 (patch)
tree1d23330d572508e84cd39968aedd5c6dd6782c79
parent79125ecf7d54b04cc56818b6dd99813d0a4daf89 (diff)
stats: Remove warnings about never read variables
Nothing is being done with these return values. Remove them for now and update the TODO entry that is present at two of the three places. stats.c: In function ‘rate_ctr_handler’: stats.c:570:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] int rc; ^ stats.c: In function ‘osmo_stat_item_handler’: stats.c:617:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] int rc; ^ stats.c: In function ‘handle_counter’: stats.c:651:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] int rc;
-rw-r--r--src/stats.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/stats.c b/src/stats.c
index b398d073..39247b6a 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -567,7 +567,6 @@ static int rate_ctr_handler(
const struct rate_ctr_desc *desc, void *sctx_)
{
struct osmo_stats_reporter *srep;
- int rc;
int64_t delta = rate_ctr_difference(ctr);
if (delta == 0)
@@ -581,10 +580,10 @@ static int rate_ctr_handler(
ctrg->idx, ctrg->desc->class_id))
return 0;
- rc = osmo_stats_reporter_send_counter(srep, ctrg, desc,
+ osmo_stats_reporter_send_counter(srep, ctrg, desc,
ctr->current, delta);
- /* TODO: handle rc (log?, inc counter(!)?) or remove it */
+ /* TODO: handle result (log?, inc counter(!)?) or remove it */
}
return 0;
@@ -614,7 +613,6 @@ static int osmo_stat_item_handler(
struct osmo_stat_item_group *statg, struct osmo_stat_item *item, void *sctx_)
{
struct osmo_stats_reporter *srep;
- int rc;
int32_t idx = current_stat_item_index;
int32_t value;
@@ -627,7 +625,7 @@ static int osmo_stat_item_handler(
statg->idx, statg->desc->class_id))
return 0;
- rc = osmo_stats_reporter_send_item(srep, statg,
+ osmo_stats_reporter_send_item(srep, statg,
item->desc, value);
}
}
@@ -648,7 +646,6 @@ static int osmo_stat_item_group_handler(struct osmo_stat_item_group *statg, void
static int handle_counter(struct osmo_counter *counter, void *sctx_)
{
struct osmo_stats_reporter *srep;
- int rc;
struct rate_ctr_desc desc = {0};
/* Fake a rate counter description */
desc.name = counter->name;
@@ -663,10 +660,10 @@ static int handle_counter(struct osmo_counter *counter, void *sctx_)
if (!srep->running)
continue;
- rc = osmo_stats_reporter_send_counter(srep, NULL, &desc,
+ osmo_stats_reporter_send_counter(srep, NULL, &desc,
counter->value, delta);
- /* TODO: handle rc (log?, inc counter(!)?) */
+ /* TODO: handle result (log?, inc counter(!)?) */
}
return 0;