[newlib-cygwin/main] ftw: Fix incompatible pointer types error
Jeff Johnston
jjohnstn@sourceware.org
Thu May 22 22:02:47 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=577ce85eadcb1014fd02304768cffc5f1d9ba75b
commit 577ce85eadcb1014fd02304768cffc5f1d9ba75b
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Sat May 17 18:39:22 2025 +0200
ftw: Fix incompatible pointer types error
This fixes a compile error with GCC 15.
Diff:
---
newlib/libc/posix/ftw.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/newlib/libc/posix/ftw.c b/newlib/libc/posix/ftw.c
index 79e63582c..e3ca85cc5 100644
--- a/newlib/libc/posix/ftw.c
+++ b/newlib/libc/posix/ftw.c
@@ -30,7 +30,9 @@ int ftw(const char *path, int (*fn)(const char *, const struct stat *, int), int
/* The following cast assumes that calling a function with one
* argument more than it needs behaves as expected. This is
* actually undefined, but works on all real-world machines. */
- return nftw(path, (int (*)())fn, fd_limit, FTW_PHYS);
+ return nftw(path,
+ (int (*)(const char *, const struct stat *, int, struct FTW *))fn,
+ fd_limit, FTW_PHYS);
}
#endif /* ! HAVE_OPENDIR */
More information about the Newlib-cvs
mailing list