Skip to content

chore: update function pointer signatures with correct args for C23 #10476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nuclearpidgeon
Copy link
Contributor

see: https://gcc.gnu.org/gcc-15/porting_to.html#c23-fn-decls-without-parameters

Fixes another GCC15 build error that's similar to #10471:

Building C object src/proxy/go/CMakeFiles/flb-plugin-proxy-go.dir/go.c.o
/home/stewart/Projects/OSS/fluentbit-4/src/proxy/go/go.c: In function ‘proxy_go_output_init’:
/home/stewart/Projects/OSS/fluentbit-4/src/proxy/go/go.c:110:11: error: too many arguments to function ‘plugin->cb_init’; expected 0, have 1
  110 |     ret = plugin->cb_init(plugin);
      |           ^~~~~~          ~~~~~~
In file included from /home/stewart/Projects/OSS/fluentbit-4/src/proxy/go/go.c:25:
/home/stewart/Projects/OSS/fluentbit-4/src/proxy/go/./go.h:32:11: note: declared here
   32 |     int (*cb_init)();
      |           ^~~~~~~
/home/stewart/Projects/OSS/fluentbit-4/src/proxy/go/go.c: In function ‘proxy_go_input_init’:
/home/stewart/Projects/OSS/fluentbit-4/src/proxy/go/go.c:224:11: error: too many arguments to function ‘plugin->cb_init’; expected 0, have 1
  224 |     ret = plugin->cb_init(plugin);
      |           ^~~~~~          ~~~~~~
/home/stewart/Projects/OSS/fluentbit-4/src/proxy/go/./go.h:45:11: note: declared here
   45 |     int (*cb_init)();
      |           ^~~~~~~
/home/stewart/Projects/OSS/fluentbit-4/src/proxy/go/go.c: In function ‘proxy_go_custom_init’:
/home/stewart/Projects/OSS/fluentbit-4/src/proxy/go/go.c:340:11: error: too many arguments to function ‘plugin->cb_init’; expected 0, have 1
  340 |     ret = plugin->cb_init(plugin);
      |           ^~~~~~          ~~~~~~
/home/stewart/Projects/OSS/fluentbit-4/src/proxy/go/./go.h:57:11: note: declared here
   57 |     int (*cb_init)();
      |           ^~~~~~~

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

@cosmo0920
Copy link
Contributor

Fixes another GCC15 build error that's similar to #10471:

This can be tested with archlinux or other cutting-edge package provided distributions?

@cosmo0920
Copy link
Contributor

Ah, could you split two of the PRs? This is because this PS includes two different changes of modules. So, one is for plugin interface, the other is for in_docker plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants