summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Kobal <vlad@prokk.net>2022-01-10 15:17:45 +0200
committerGitHub <noreply@github.com>2022-01-10 15:17:45 +0200
commit3ba9dc6cf0905115f8e5046bd4e50bb866c15ded (patch)
treeec6574ac5a8133087f0537a46ee3c49cfcaf2dc0
parentc2c0b688726fdf6ce4cd77449cb58b87e23769b7 (diff)
Fix compilation warnings (#11846)
-rw-r--r--database/sqlite/sqlite_aclk_alert.c2
-rw-r--r--database/sqlite/sqlite_aclk_chart.c4
-rw-r--r--ml/ml-dummy.c5
3 files changed, 9 insertions, 2 deletions
diff --git a/database/sqlite/sqlite_aclk_alert.c b/database/sqlite/sqlite_aclk_alert.c
index 8d76942443..cc7dfdc9b4 100644
--- a/database/sqlite/sqlite_aclk_alert.c
+++ b/database/sqlite/sqlite_aclk_alert.c
@@ -724,6 +724,7 @@ void health_alarm_entry2proto_nolock(struct alarm_log_entry *alarm_log, ALARM_EN
}
#endif
+#ifdef ENABLE_NEW_CLOUD_PROTOCOL
static int have_recent_alarm(RRDHOST *host, uint32_t alarm_id, time_t mark)
{
ALARM_ENTRY *ae = host->health_log.alarms;
@@ -737,6 +738,7 @@ static int have_recent_alarm(RRDHOST *host, uint32_t alarm_id, time_t mark)
return 0;
}
+#endif
#define ALARM_EVENTS_PER_CHUNK 10
void aclk_push_alert_snapshot_event(struct aclk_database_worker_config *wc, struct aclk_database_cmd cmd)
diff --git a/database/sqlite/sqlite_aclk_chart.c b/database/sqlite/sqlite_aclk_chart.c
index 4b887abaa7..fcf01b22c0 100644
--- a/database/sqlite/sqlite_aclk_chart.c
+++ b/database/sqlite/sqlite_aclk_chart.c
@@ -318,7 +318,7 @@ void aclk_send_chart_event(struct aclk_database_worker_config *wc, struct aclk_d
uint64_t first_sequence;
uint64_t last_sequence;
- time_t last_timestamp;
+ time_t last_timestamp = 0;
BUFFER *sql = buffer_create(1024);
@@ -979,6 +979,8 @@ int queue_chart_to_aclk(RRDSET *st)
#ifndef ENABLE_NEW_CLOUD_PROTOCOL
#ifdef ENABLE_ACLK
aclk_update_chart(st->rrdhost, st->id, 1);
+#else
+ UNUSED(st);
#endif
return 0;
#else
diff --git a/ml/ml-dummy.c b/ml/ml-dummy.c
index 795b80c34e..222f0b0f66 100644
--- a/ml/ml-dummy.c
+++ b/ml/ml-dummy.c
@@ -10,7 +10,10 @@ void ml_new_host(RRDHOST *RH) { (void) RH; }
void ml_delete_host(RRDHOST *RH) { (void) RH; }
-char *ml_get_host_info(RRDHOST *RH) { (void) RH; }
+char *ml_get_host_info(RRDHOST *RH) {
+ (void) RH;
+ return NULL;
+}
void ml_new_dimension(RRDDIM *RD) { (void) RD; }