diff options
| author | Robert Bielik <Robert.Bielik@dirac.com> | 2019-12-30 10:38:14 +0100 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-12-30 11:55:29 -0800 |
| commit | 3890f856068542c6ddb7b498a2e313b026450bd2 (patch) | |
| tree | 1699400c7cb5567effb00dec28dc7fa9b4bffeed /src/core/stats.c | |
| parent | c9736702920ec15e0f4a5b58abf60ea2a8d7e9e4 (diff) | |
| download | nng-3890f856068542c6ddb7b498a2e313b026450bd2.tar.gz nng-3890f856068542c6ddb7b498a2e313b026450bd2.tar.bz2 nng-3890f856068542c6ddb7b498a2e313b026450bd2.zip | |
Fix compilation errors and warnings when NNG_ENABLE_STATS is OFF
Diffstat (limited to 'src/core/stats.c')
| -rw-r--r-- | src/core/stats.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 |
