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

Dupremove fails to compile on 32-bit system with GCC-14: incompatible pointer types #344

Closed
NHOrus opened this issue May 12, 2024 · 2 comments

Comments

@NHOrus
Copy link

NHOrus commented May 12, 2024

Gentoo bug: https://bugs.gentoo.org/928358
Error:

run_dedupe.c:161:44: error: passing argument 4 of ‘fiemap_count_shared’ from incompatible pointer type [-Wincompatible-pointer-types[https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wincompatible-pointer-types]]
  161 |                                            &bytes);
      |                                            ^~~~~~
      |                                            |
      |                                            uint64_t * {aka long long unsigned int *}
In file included from run_dedupe.c:42:
fiemap.h:29:75: note: expected ‘size_t *’ {aka ‘unsigned int *’} but argument is of type ‘uint64_t *’ {aka ‘long long unsigned int *’}
   29 | count_shared(int fd, size_t start_off, size_t end_off, size_t *shared);
      |                                                        ~~~~~~~~^~~~~~

As size_t is 32 bit on 32-bit systems and 64 on 64-bit.

@JackSlateur
Copy link
Collaborator

Hello @NHOrus
Thank you for the report, I believe this is now fixed

Best regards

@NHOrus
Copy link
Author

NHOrus commented May 12, 2024

Thank you! And now, wait until someone replicates that...

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

No branches or pull requests

2 participants