summaryrefslogtreecommitdiffstats
path: root/exporting
diff options
context:
space:
mode:
authorStelios Fragkakis <52996999+stelfrag@users.noreply.github.com>2021-11-19 22:12:29 +0200
committerGitHub <noreply@github.com>2021-11-19 22:12:29 +0200
commit454387fcf4d30b57f0f2264f9d4acce081808d7a (patch)
tree94c5881dceb1bbb1f38a520a73a2be08d7787a2b /exporting
parent11b8588c94b37b7a082a041342e69e21a0a81ad5 (diff)
Cleanup compilation warnings (#11810)
* Fix compilation warnings (variables used when debugging is enabled using NETDATA_INTERNAL_CHECKS) * Fix compilation warning (casting)
Diffstat (limited to 'exporting')
-rw-r--r--exporting/check_filters.c2
-rw-r--r--exporting/mongodb/mongodb.c2
-rw-r--r--exporting/process_data.c2
-rw-r--r--exporting/prometheus/prometheus.c2
4 files changed, 8 insertions, 0 deletions
diff --git a/exporting/check_filters.c b/exporting/check_filters.c
index 64ced7238c..d2d7d870fb 100644
--- a/exporting/check_filters.c
+++ b/exporting/check_filters.c
@@ -43,7 +43,9 @@ int rrdhost_is_exportable(struct instance *instance, RRDHOST *host)
*/
int rrdset_is_exportable(struct instance *instance, RRDSET *st)
{
+#ifdef NETDATA_INTERNAL_CHECKS
RRDHOST *host = st->rrdhost;
+#endif
if (st->exporting_flags == NULL)
st->exporting_flags = callocz(instance->engine->instance_num, sizeof(size_t));
diff --git a/exporting/mongodb/mongodb.c b/exporting/mongodb/mongodb.c
index 44922a2424..49ce952691 100644
--- a/exporting/mongodb/mongodb.c
+++ b/exporting/mongodb/mongodb.c
@@ -276,7 +276,9 @@ void mongodb_cleanup(struct instance *instance)
void mongodb_connector_worker(void *instance_p)
{
struct instance *instance = (struct instance *)instance_p;
+#ifdef NETDATA_INTERNAL_CHECKS
struct mongodb_specific_config *connector_specific_config = instance->config.connector_specific_config;
+#endif
struct mongodb_specific_data *connector_specific_data =
(struct mongodb_specific_data *)instance->connector_specific_data;
diff --git a/exporting/process_data.c b/exporting/process_data.c
index 5e11b39482..2c0c2d17ce 100644
--- a/exporting/process_data.c
+++ b/exporting/process_data.c
@@ -70,7 +70,9 @@ calculated_number exporting_calculate_value_from_stored_data(
time_t *last_timestamp)
{
RRDSET *st = rd->rrdset;
+#ifdef NETDATA_INTERNAL_CHECKS
RRDHOST *host = st->rrdhost;
+#endif
time_t after = instance->after;
time_t before = instance->before;
diff --git a/exporting/prometheus/prometheus.c b/exporting/prometheus/prometheus.c
index 5b21c105d7..0a3190074b 100644
--- a/exporting/prometheus/prometheus.c
+++ b/exporting/prometheus/prometheus.c
@@ -16,7 +16,9 @@
*/
inline int can_send_rrdset(struct instance *instance, RRDSET *st)
{
+#ifdef NETDATA_INTERNAL_CHECKS
RRDHOST *host = st->rrdhost;
+#endif
if (unlikely(rrdset_flag_check(st, RRDSET_FLAG_EXPORTING_IGNORE)))
return 0;