From 3890f856068542c6ddb7b498a2e313b026450bd2 Mon Sep 17 00:00:00 2001 From: Robert Bielik Date: Mon, 30 Dec 2019 10:38:14 +0100 Subject: Fix compilation errors and warnings when NNG_ENABLE_STATS is OFF --- src/core/stats.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/stats.c') diff --git a/src/core/stats.c b/src/core/stats.c index 74b14f59..3c200fec 100644 --- a/src/core/stats.c +++ b/src/core/stats.c @@ -60,9 +60,13 @@ nni_stat_add(nni_stat_item *parent, nni_stat_item *child) void nni_stat_register(nni_stat_item *child) { +#ifdef NNG_ENABLE_STATS nni_mtx_lock(&stats_lock); nni_stat_add(&stats_root, child); nni_mtx_unlock(&stats_lock); +#else + NNI_ARG_UNUSED(child); +#endif } void -- cgit v1.2.3-70-g09d2