From f09cc5ec0940b686f1422cddbdeb53d704b84233 Mon Sep 17 00:00:00 2001 From: Ruini Xue Date: Sat, 1 Feb 2020 16:37:16 +0800 Subject: Fix stats build error. --- src/core/stats.c | 4 ++++ 1 file changed, 4 insertions(+) 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