Fix warnings and error when compiling with --disable-dbengine (#14919)
Stelios Fragkakis committed
Apr 18, 2023 at 14:14 UTC
fec3e8f287f20e64b27ed65c43201fc7c8fbe90d
3 files changed
+8
-8
database/rrd.h
+6
-6
@@ -425,7 +425,7 @@ void rrddim_memory_file_save(RRDDIM *rd);
425
426
STORAGE_METRICS_GROUP *rrdeng_metrics_group_get(STORAGE_INSTANCE *db_instance, uuid_t *uuid);
427
STORAGE_METRICS_GROUP *rrddim_metrics_group_get(STORAGE_INSTANCE *db_instance, uuid_t *uuid);
428
-static inline STORAGE_METRICS_GROUP *storage_engine_metrics_group_get(STORAGE_ENGINE_BACKEND backend, STORAGE_INSTANCE *db_instance, uuid_t *uuid) {
428
+static inline STORAGE_METRICS_GROUP *storage_engine_metrics_group_get(STORAGE_ENGINE_BACKEND backend __maybe_unused, STORAGE_INSTANCE *db_instance, uuid_t *uuid) {
429
internal_fatal(!is_valid_backend(backend), "STORAGE: invalid backend");
430
431
#ifdef ENABLE_DBENGINE
@@ -437,7 +437,7 @@ static inline STORAGE_METRICS_GROUP *storage_engine_metrics_group_get(STORAGE_EN
437
438
void rrdeng_metrics_group_release(STORAGE_INSTANCE *db_instance, STORAGE_METRICS_GROUP *smg);
439
void rrddim_metrics_group_release(STORAGE_INSTANCE *db_instance, STORAGE_METRICS_GROUP *smg);
440
-static inline void storage_engine_metrics_group_release(STORAGE_ENGINE_BACKEND backend, STORAGE_INSTANCE *db_instance, STORAGE_METRICS_GROUP *smg) {
440
+static inline void storage_engine_metrics_group_release(STORAGE_ENGINE_BACKEND backend __maybe_unused, STORAGE_INSTANCE *db_instance, STORAGE_METRICS_GROUP *smg) {
441
internal_fatal(!is_valid_backend(backend), "STORAGE: invalid backend");
442
443
#ifdef ENABLE_DBENGINE
@@ -450,7 +450,7 @@ static inline void storage_engine_metrics_group_release(STORAGE_ENGINE_BACKEND b
450
451
STORAGE_COLLECT_HANDLE *rrdeng_store_metric_init(STORAGE_METRIC_HANDLE *db_metric_handle, uint32_t update_every, STORAGE_METRICS_GROUP *smg);
452
STORAGE_COLLECT_HANDLE *rrddim_collect_init(STORAGE_METRIC_HANDLE *db_metric_handle, uint32_t update_every, STORAGE_METRICS_GROUP *smg);
453
-static inline STORAGE_COLLECT_HANDLE *storage_metric_store_init(STORAGE_ENGINE_BACKEND backend, STORAGE_METRIC_HANDLE *db_metric_handle, uint32_t update_every, STORAGE_METRICS_GROUP *smg) {
453
+static inline STORAGE_COLLECT_HANDLE *storage_metric_store_init(STORAGE_ENGINE_BACKEND backend __maybe_unused, STORAGE_METRIC_HANDLE *db_metric_handle, uint32_t update_every, STORAGE_METRICS_GROUP *smg) {
454
internal_fatal(!is_valid_backend(backend), "STORAGE: invalid backend");
455
456
#ifdef ENABLE_DBENGINE
@@ -537,7 +537,7 @@ static inline void storage_engine_store_change_collection_frequency(STORAGE_COLL
537
538
time_t rrdeng_metric_oldest_time(STORAGE_METRIC_HANDLE *db_metric_handle);
539
time_t rrddim_query_oldest_time_s(STORAGE_METRIC_HANDLE *db_metric_handle);
540
-static inline time_t storage_engine_oldest_time_s(STORAGE_ENGINE_BACKEND backend, STORAGE_METRIC_HANDLE *db_metric_handle) {
540
+static inline time_t storage_engine_oldest_time_s(STORAGE_ENGINE_BACKEND backend __maybe_unused, STORAGE_METRIC_HANDLE *db_metric_handle) {
541
internal_fatal(!is_valid_backend(backend), "STORAGE: invalid backend");
542
543
#ifdef ENABLE_DBENGINE
@@ -549,7 +549,7 @@ static inline time_t storage_engine_oldest_time_s(STORAGE_ENGINE_BACKEND backend
549
550
time_t rrdeng_metric_latest_time(STORAGE_METRIC_HANDLE *db_metric_handle);
551
time_t rrddim_query_latest_time_s(STORAGE_METRIC_HANDLE *db_metric_handle);
552
-static inline time_t storage_engine_latest_time_s(STORAGE_ENGINE_BACKEND backend, STORAGE_METRIC_HANDLE *db_metric_handle) {
552
+static inline time_t storage_engine_latest_time_s(STORAGE_ENGINE_BACKEND backend __maybe_unused, STORAGE_METRIC_HANDLE *db_metric_handle) {
553
internal_fatal(!is_valid_backend(backend), "STORAGE: invalid backend");
554
555
#ifdef ENABLE_DBENGINE
@@ -568,7 +568,7 @@ void rrddim_query_init(
568
time_t start_time_s, time_t end_time_s, STORAGE_PRIORITY priority);
569
570
static inline void storage_engine_query_init(
571
- STORAGE_ENGINE_BACKEND backend,
571
+ STORAGE_ENGINE_BACKEND backend __maybe_unused,
572
STORAGE_METRIC_HANDLE *db_metric_handle, struct storage_engine_query_handle *handle,
573
time_t start_time_s, time_t end_time_s, STORAGE_PRIORITY priority) {
574
internal_fatal(!is_valid_backend(backend), "STORAGE: invalid backend");
streaming/replication.c
+1
-1
@@ -292,7 +292,7 @@ static void replication_query_align_to_optimal_before(struct replication_query *
292
struct replication_dimension *d = &q->data[i];
293
if(unlikely(!d->enabled)) continue;
294
295
- time_t new_before = rrdeng_load_align_to_optimal_before(&d->handle);
295
+ time_t new_before = storage_engine_align_to_optimal_before(&d->handle);
296
if (!expanded_before || new_before < expanded_before)
297
expanded_before = new_before;
298
}
web/api/queries/weights.c
+1
-1
@@ -367,7 +367,7 @@ static void results_header_to_json_v2(DICTIONARY *results __maybe_unused, BUFFER
367
time_t baseline_after, time_t baseline_before,
368
size_t points, WEIGHTS_METHOD method,
369
RRDR_TIME_GROUPING group, RRDR_OPTIONS options, uint32_t shifts,
370
- size_t examined_dimensions __maybe_unused, usec_t duration,
370
+ size_t examined_dimensions __maybe_unused, usec_t duration __maybe_unused,
371
WEIGHTS_STATS *stats, bool group_by) {
372
373
buffer_json_member_add_object(wb, "request");