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

With gcc 14.2.1, build fails with -Wimplicit-function-declaration and -Wincompatible-pointer-types #6

Open
dreirund opened this issue Oct 19, 2024 · 0 comments

Comments

@dreirund
Copy link

With gcc 14.2.1, build fails with -Wimplicit-function-declaration and -Wincompatible-pointer-types:

In file included from osdep.c:31:
env_unix.c: In function ‘lock_work’:
osdep.h:60:15: error: implicit declaration of function ‘safe_flock’ [-Wimplicit-function-declaration]
   60 | #define flock safe_flock
      |               ^~~~~~~~~~
news.c: In function ‘news_open’:
news.c:370:36: error: passing argument 3 of ‘scandir’ from incompatible pointer type [-Wincompatible-pointer-types]
  370 |   if ((nmsgs = scandir (tmp,&names,news_select,news_numsort)) >= 0) {
      |                                    ^~~~~~~~~~~
      |                                    |
      |                                    int (*)(struct dirent *)
In file included from osdep.h:47,
                 from news.c:35:
/usr/include/dirent.h:259:27: note: expected ‘int (*)(const struct dirent *)’ but argument is of type ‘int (*)(struct dirent *)’
  259 |                     int (*__selector) (const struct dirent *),
      |                     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
news.c:370:48: error: passing argument 4 of ‘scandir’ from incompatible pointer type [-Wincompatible-pointer-types]
  370 |   if ((nmsgs = scandir (tmp,&names,news_select,news_numsort)) >= 0) {
      |                                                ^~~~~~~~~~~~
      |                                                |
      |                                                int (*)(const void *, const void *)
/usr/include/dirent.h:260:27: note: expected ‘int (*)(const struct dirent **, const struct dirent **)’ but argument is of type ‘int (*)(const void *, const void *)’
  260 |                     int (*__cmp) (const struct dirent **,
      |                     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  261 |                                   const struct dirent **))
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~

Regards!

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

1 participant