Fix compilation warnings (#12886)

This commit is contained in:
Vladimir Kobal 2022-05-12 15:08:38 +03:00 committed by GitHub
parent b3c1cf5151
commit a68ae03b9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 11 deletions

View File

@ -1293,8 +1293,7 @@ extern avl_tree_lock rrdhost_root_index;
extern char *rrdset_strncpyz_name(char *to, const char *from, size_t length);
extern char *rrdset_cache_dir(RRDHOST *host, const char *id);
#define rrddim_free(st, rd) rrddim_free_custom(st, rd, 0)
extern void rrddim_free_custom(RRDSET *st, RRDDIM *rd, int db_rotated);
extern void rrddim_free(RRDSET *st, RRDDIM *rd);
extern int rrddim_compare(void* a, void* b);
extern int rrdset_compare(void* a, void* b);

View File

@ -369,13 +369,10 @@ RRDDIM *rrddim_add_custom(RRDSET *st, const char *id, const char *name, collecte
// ----------------------------------------------------------------------------
// RRDDIM remove / free a dimension
void rrddim_free_custom(RRDSET *st, RRDDIM *rd, int db_rotated)
void rrddim_free(RRDSET *st, RRDDIM *rd)
{
ml_delete_dimension(rd);
#ifndef ENABLE_ACLK
UNUSED(db_rotated);
#endif
debug(D_RRD_CALLS, "rrddim_free() %s.%s", st->name, rd->name);
if (!rrddim_flag_check(rd, RRDDIM_FLAG_ARCHIVED)) {

View File

@ -48,7 +48,7 @@ public:
}
virtual ~RrdDimension() {
rrddim_free_custom(AnomalyRateRD->rrdset, AnomalyRateRD, 0);
rrddim_free(AnomalyRateRD->rrdset, AnomalyRateRD);
}
private:

View File

@ -10,9 +10,9 @@ extern "C" {
#include "daemon/common.h"
#include "web/api/queries/rrdr.h"
// This is an internal DBEngine function redeclared here so that we can free
// This is a DBEngine function redeclared here so that we can free
// the anomaly rate dimension, whenever its backing dimension is freed.
extern void rrddim_free_custom(RRDSET *st, RRDDIM *rd, int db_rotated);
extern void rrddim_free(RRDSET *st, RRDDIM *rd);
typedef void* ml_host_t;
typedef void* ml_dimension_t;

View File

@ -268,7 +268,7 @@ inline int parser_action(PARSER *parser, char *input)
uint32_t command_hash = simple_hash(command);
size_t worker_job_id;
size_t worker_job_id = 0;
while(tmp_keyword) {
if (command_hash == tmp_keyword->keyword_hash &&
(!strcmp(command, tmp_keyword->keyword))) {