From 6eb89beb35b9166e98b89b749a84a5642250c7a6 Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Mon, 7 Sep 2020 10:11:46 -0600 Subject: [PATCH] out_stackdriver: add cast for regex_match() variable Signed-off-by: Eduardo Silva --- plugins/out_stackdriver/stackdriver.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/out_stackdriver/stackdriver.c b/plugins/out_stackdriver/stackdriver.c index 18c20c2d4d1..5fc859ea088 100644 --- a/plugins/out_stackdriver/stackdriver.c +++ b/plugins/out_stackdriver/stackdriver.c @@ -373,7 +373,7 @@ static struct mk_list *parse_local_resource_id_to_list(char *local_resource_id, } else if (strncmp(type, K8S_NODE, len_k8s_node) == 0) { max_split = 2; - } + } else if (strncmp(type, K8S_POD, len_k8s_pod) == 0) { max_split = 3; } @@ -706,7 +706,9 @@ int is_tag_match_regex(struct flb_stackdriver *ctx, const char *tag, int tag_len len_to_be_matched = tag_len - tag_prefix_len; regex = flb_regex_create(DEFAULT_TAG_REGEX); - ret = flb_regex_match(regex, tag_str_to_be_matcheds, len_to_be_matched); + ret = flb_regex_match(regex, + (unsigned char *) tag_str_to_be_matcheds, + len_to_be_matched); flb_regex_destroy(regex); /* 1 -> match; 0 -> doesn't match; < 0 -> error */