Skip to content
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

in_elasticsearch: include file to fix warnings #8590

Merged
merged 1 commit into from
Mar 17, 2024

Conversation

nokute78
Copy link
Collaborator

This patch is to fix following warnings.

[ 57%] Building C object plugins/in_elasticsearch/CMakeFiles/flb-plugin-in_elasticsearch.dir/in_elasticsearch.c.o
In file included from /home/taka/git/fluent-bit/plugins/in_elasticsearch/in_elasticsearch.c:28:
/home/taka/git/fluent-bit/plugins/in_elasticsearch/in_elasticsearch_bulk_prot.h:31:46: warning: ‘struct in_elasticsearch_bulk_conn’ declared inside parameter list will not be visible outside of this definition or declaration
   31 |                                       struct in_elasticsearch_bulk_conn *conn,
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/taka/git/fluent-bit/plugins/in_elasticsearch/in_elasticsearch_bulk_prot.h:36:52: warning: ‘struct in_elasticsearch_bulk_conn’ declared inside parameter list will not be visible outside of this definition or declaration
   36 |                                             struct in_elasticsearch_bulk_conn *conn,
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~

Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • [N/A] Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • [N/A] Run local packaging test showing all targets (including any new ones) build.
  • [N/A] Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • [N/A] Documentation required for this feature

Backporting

  • [N/A] Backport to latest stable release.

Debug/Valgrind output

$ valgrind --leak-check=full bin/flb-rt-in_elasticsearch 
==23660== Memcheck, a memory error detector
==23660== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==23660== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==23660== Command: bin/flb-rt-in_elasticsearch
==23660== 
Test version...                                 ==23660== Warning: invalid file descriptor -1 in syscall close()
[ OK ]
Test configured_version...                      ==23660== Warning: invalid file descriptor -1 in syscall close()
[ OK ]
Test index_op...                                ==23660== Warning: invalid file descriptor -1 in syscall close()
[ OK ]
Test create_op...                               ==23660== Warning: invalid file descriptor -1 in syscall close()
[ OK ]
Test update_op...                               ==23660== Warning: invalid file descriptor -1 in syscall close()
[ OK ]
Test delete_op...                               ==23660== Warning: invalid file descriptor -1 in syscall close()
[ OK ]
Test nonexistent_op...                          ==23660== Warning: invalid file descriptor -1 in syscall close()
[ OK ]
Test multi_ops...                               ==23660== Warning: invalid file descriptor -1 in syscall close()
[ OK ]
Test multi_ops_gzip...                          ==23660== Warning: invalid file descriptor -1 in syscall close()
[ OK ]
Test index_op_with_plugin_tag...                ==23660== Warning: invalid file descriptor -1 in syscall close()
[ OK ]
Test node_info...                               ==23660== Warning: invalid file descriptor -1 in syscall close()
[ OK ]
Test tag_key...                                 ==23660== Warning: invalid file descriptor -1 in syscall close()
[ OK ]
SUCCESS: All unit tests have passed.
==23660== 
==23660== HEAP SUMMARY:
==23660==     in use at exit: 0 bytes in 0 blocks
==23660==   total heap usage: 29,067 allocs, 29,067 frees, 80,142,440 bytes allocated
==23660== 
==23660== All heap blocks were freed -- no leaks are possible
==23660== 
==23660== For lists of detected and suppressed errors, rerun with: -s
==23660== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

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.

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