Skip to content

Commit 7e7433c

Browse files
cosmo0920edsiper
authored andcommitted
input: Fix an incompatible pointer
This incompatible pointer causes the following error in gcc15: ```log ~/GitHub/fluent-bit/src/flb_input.c: In function 'flb_input_instance_init': ~/GitHub/fluent-bit/src/flb_input.c:1247:22: error: passing argument 1 of 'cmt_gauge_set' from incompatible pointer type [-Wincompatible-pointer-types] 1247 | cmt_gauge_set(ins->cmt_ring_buffer_writes, ts, 0, 1, (char *[]) {name}); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~ | | | struct cmt_counter * In file included from ~/GitHub/fluent-bit/include/fluent-bit/flb_upstream.h:34, from ~/GitHub/fluent-bit/include/fluent-bit/flb_input.h:29, from ~/GitHub/fluent-bit/src/flb_input.c:29: ~/GitHub/fluent-bit/lib/cmetrics/include/cmetrics/cmt_gauge.h:38:37: note: expected 'struct cmt_gauge *' but argument is of type 'struct cmt_counter *' 38 | int cmt_gauge_set(struct cmt_gauge *gauge, uint64_t timestamp, double val, | ~~~~~~~~~~~~~~~~~~^~~~~ ~/GitHub/fluent-bit/src/flb_network.c: In function 'flb_net_dns_lookup_context_create': ~/GitHub/fluent-bit/src/flb_network.c:1123:5: warning: 'ares_set_socket_functions' is deprecated: Use ares_set_socket_functions_ex instead [-Wdeprecated-declarations] 1123 | ares_set_socket_functions(lookup_context->ares_channel, | ^~~~~~~~~~~~~~~~~~~~~~~~~ ``` Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 309a3ee commit 7e7433c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/flb_input.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ int flb_input_instance_init(struct flb_input_instance *ins,
12441244
"ring_buffer_writes_total",
12451245
"Number of ring buffer writes.",
12461246
1, (char *[]) {"name"});
1247-
cmt_gauge_set(ins->cmt_ring_buffer_writes, ts, 0, 1, (char *[]) {name});
1247+
cmt_counter_set(ins->cmt_ring_buffer_writes, ts, 0, 1, (char *[]) {name});
12481248

12491249
/* fluentbit_input_ring_buffer_retries_total */
12501250
ins->cmt_ring_buffer_retries = \

0 commit comments

Comments
 (0)