summaryrefslogtreecommitdiffstats
path: root/exporting/prometheus/prometheus.c
diff options
context:
space:
mode:
Diffstat (limited to 'exporting/prometheus/prometheus.c')
-rw-r--r--exporting/prometheus/prometheus.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/exporting/prometheus/prometheus.c b/exporting/prometheus/prometheus.c
index 2d0611fdf..9e3f4bbf1 100644
--- a/exporting/prometheus/prometheus.c
+++ b/exporting/prometheus/prometheus.c
@@ -292,7 +292,7 @@ struct format_prometheus_label_callback {
size_t count;
};
-static int format_prometheus_label_callback(const char *name, const char *value, RRDLABEL_SRC ls, void *data) {
+static int format_prometheus_label_callback(const char *name, const char *value, RRDLABEL_SRC ls __maybe_unused, void *data) {
struct format_prometheus_label_callback *d = (struct format_prometheus_label_callback *)data;
if (!should_send_label(d->instance, ls)) return 0;
@@ -333,11 +333,9 @@ void format_host_labels_prometheus(struct instance *instance, RRDHOST *host)
* @param data is the buffer used to add labels.
*/
-static int format_prometheus_chart_label_callback(const char *name, const char *value, RRDLABEL_SRC ls, void *data) {
+static int format_prometheus_chart_label_callback(const char *name, const char *value, RRDLABEL_SRC ls __maybe_unused, void *data) {
BUFFER *wb = data;
- (void)ls;
-
if (name[0] == '_' )
return 1;
@@ -496,7 +494,7 @@ static void generate_as_collected_prom_metric(BUFFER *wb,
struct gen_parameters *p,
int homogeneous,
int prometheus_collector,
- DICTIONARY *chart_labels)
+ RRDLABELS *chart_labels)
{
buffer_sprintf(wb, "%s_%s", p->prefix, p->context);
@@ -524,7 +522,7 @@ static void generate_as_collected_prom_metric(BUFFER *wb,
buffer_sprintf(wb, COLLECTED_NUMBER_FORMAT, p->rd->collector.last_collected_value);
if (p->output_options & PROMETHEUS_OUTPUT_TIMESTAMPS)
- buffer_sprintf(wb, " %llu\n", timeval_msec(&p->rd->collector.last_collected_time));
+ buffer_sprintf(wb, " %"PRIu64"\n", timeval_msec(&p->rd->collector.last_collected_time));
else
buffer_sprintf(wb, "\n");
}