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

Unprototyped functions are no longer permitted #12

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

Conversation

mruprich
Copy link
Contributor

GCC 15 has landed in Fedora Rawhide and the detect-renamed.diff patch breaks the build when used with the following error:

flist.c: In function ‘recv_file_list’:
flist.c:2787:55: warning: cast between incompatible function types from ‘int (*)(struct file_struct **, struct file_struct **)’ to ‘int (*)(void)’ [-Wcast-function-type]
 2787 |                       sizeof the_fattr_list.files[0], (int (*)())fattr_compare);
      |                                                       ^
flist.c:2787:55: error: passing argument 4 of ‘qsort’ from incompatible pointer type [-Wincompatible-pointer-types]
 2787 |                       sizeof the_fattr_list.files[0], (int (*)())fattr_compare);
      |                                                       ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                                       |
      |                                                       int (*)(void)
In file included from rsync.h:330:
/usr/include/stdlib.h:971:34: note: expected ‘__compar_fn_t’ {aka ‘int (*)(const void *, const void *)’} but argument is of type ‘int (*)(void)’
  971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
      |                    ~~~~~~~~~~~~~~^~~~~~~~
/usr/include/stdlib.h:948:15: note: ‘__compar_fn_t’ declared here
  948 | typedef int (*__compar_fn_t) (const void *, const void *);
      |               ^~~~~~~~~~~~~

I saw the change I made also somewhere else in rsync - https://github.com/RsyncProject/rsync/blob/master/hlink.c#L120

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