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

Packaging on Arch Linux require -Wno-incompatible-pointer-types #79

Open
FabioLolix opened this issue Oct 18, 2024 · 2 comments
Open

Packaging on Arch Linux require -Wno-incompatible-pointer-types #79

FabioLolix opened this issue Oct 18, 2024 · 2 comments

Comments

@FabioLolix
Copy link
Contributor

Hi, packaging on Arch Linux (latest commit) fail if -Wno-incompatible-pointer-types is not passed, this is happening since GCC 14.1

[ 49%] Building C object lib/libzsync/CMakeFiles/libzsync.dir/sha1.c.o
/home/fabio/Dev/Github/PKGBUILD-AUR_fix/z/zsync2-git/src/zsync2/lib/libzsync/zsync.c: In function 'zsync_get_urls':
/home/fabio/Dev/Github/PKGBUILD-AUR_fix/z/zsync2-git/src/zsync2/lib/libzsync/zsync.c:460:18: error: returning 'char **' from a function with incompatible return type 'const char * const*' [-Wincompatible-pointer-types]
  460 |         return zs->zurl;
      |                ~~^~~~~~
/home/fabio/Dev/Github/PKGBUILD-AUR_fix/z/zsync2-git/src/zsync2/lib/libzsync/zsync.c:465:18: error: returning 'char **' from a function with incompatible return type 'const char * const*' [-Wincompatible-pointer-types]
  465 |         return zs->url;
      |                ~~^~~~~
/home/fabio/Dev/Github/PKGBUILD-AUR_fix/z/zsync2-git/src/zsync2/lib/libzsync/zsync.c: In function 'zsync_receive_data_compressed':
/home/fabio/Dev/Github/PKGBUILD-AUR_fix/z/zsync2-git/src/zsync2/lib/libzsync/zsync.c:945:22: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  945 |     zr->strm.next_in = buf;
      |                      ^
/home/fabio/Dev/Github/PKGBUILD-AUR_fix/z/zsync2-git/src/zsync2/lib/libzsync/zsync.c:950:43: error: passing argument 4 of 'zsync_configure_zstream_for_zdata' from incompatible pointer type [-Wincompatible-pointer-types]
  950 |                                           &(zr->outoffset));
      |                                           ^~~~~~~~~~~~~~~~
      |                                           |
      |                                           off_t * {aka long int *}
/home/fabio/Dev/Github/PKGBUILD-AUR_fix/z/zsync2-git/src/zsync2/lib/libzsync/zsync.c:791:65: note: expected 'long long int *' but argument is of type 'off_t *' {aka 'long int *'}
  791 |                                        long zoffset, long long *poutoffset) {
      |                                                      ~~~~~~~~~~~^~~~~~~~~~
/home/fabio/Dev/Github/PKGBUILD-AUR_fix/z/zsync2-git/src/zsync2/lib/libzsync/zsync.c:962:26: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  962 |         zr->strm.next_in = buf;
      |                          ^
make[2]: *** [lib/libzsync/CMakeFiles/libzsync.dir/build.make:76: lib/libzsync/CMakeFiles/libzsync.dir/zsync.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1034: lib/libzsync/CMakeFiles/libzsync.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
In function 'SHA1Update',

zsync2-git

@TheAssassin
Copy link
Member

Please don't hesitate to open a PR.

@FabioLolix
Copy link
Contributor Author

I don't have the knowledge for that sorry, the best I can do is adding or removing headers include

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