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

cprof_encode_text: fix wrong pointer assignment #3

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

Conversation

ThomasDevoogdt
Copy link

The wrong struct types were used. Typo?

/home/thomas/br-test-pkg/bootlin-armv7-glibc/build/fluent-bit-3.2.0/lib/cprofiles/src/cprof_profile.c: In function ‘cprof_profile_destroy’: /home/thomas/br-test-pkg/bootlin-armv7-glibc/build/fluent-bit-3.2.0/lib/cprofiles/src/cprof_profile.c:160:18: error: assignment to ‘struct cprof_mapping *’ from incompatible pointer type ‘struct cprof_location *’ [-Wincompatible-pointer-types]
  160 |         location = cfl_list_entry(iterator,
      |                  ^
/home/thomas/br-test-pkg/bootlin-armv7-glibc/build/fluent-bit-3.2.0/lib/cprofiles/src/cprof_profile.c:166:32: error: passing argument 1 of ‘cprof_location_destroy’ from incompatible pointer type [-Wincompatible-pointer-types]
  166 |         cprof_location_destroy(location);
      |                                ^~~~~~~~
      |                                |
      |                                struct cprof_mapping *
In file included from /home/thomas/br-test-pkg/bootlin-armv7-glibc/build/fluent-bit-3.2.0/lib/cprofiles/src/cprof_profile.c:21:
/home/thomas/br-test-pkg/bootlin-armv7-glibc/build/fluent-bit-3.2.0/lib/cprofiles/include/cprofiles/cprofiles.h:304:52: note: expected ‘struct cprof_location *’ but argument is of type ‘struct cprof_mapping *’
  304 | void cprof_location_destroy(struct cprof_location *instance);
      |                             ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~

Fixes:

@ThomasDevoogdt ThomasDevoogdt force-pushed the bugfix/incompatible-pointer-types branch from 00ccc8d to e827108 Compare November 17, 2024 06:45
@ThomasDevoogdt ThomasDevoogdt changed the title src/cprof_{encode_text,profile}.c: fix wrong pointer assignment cprof_encode_text: fix wrong pointer assignment Nov 17, 2024
@ThomasDevoogdt
Copy link
Author

Updated this PR to reflect the change made in d986f92.

@ThomasDevoogdt
Copy link
Author

@edsiper ping, you've probably missed this one, when reading fluent/fluent-bit#9601.

@ThomasDevoogdt
Copy link
Author

@edsiper It has been a while. Any chance that this gets approved? I try to reduce my own patch list.

The wrong struct types were used. Typo?

Signed-off-by: Thomas Devoogdt <[email protected]>
@ThomasDevoogdt ThomasDevoogdt force-pushed the bugfix/incompatible-pointer-types branch from e827108 to 4201714 Compare December 15, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant