]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Remove dead unlink forward declaration in minigzip tests
authorNathan Moin Vaziri <nathan@nathanm.com>
Fri, 17 Apr 2026 07:07:23 +0000 (00:07 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Tue, 26 May 2026 15:11:31 +0000 (17:11 +0200)
Both files include zbuild.h which now unconditionally defines
_LARGEFILE64_SOURCE, making the !defined(_LARGEFILE64_SOURCE) clause
always false and the whole block unreachable. The upstream-zlib
purpose was forward-declaring unlink on platforms without unistd.h
that aren't Windows, but zlib-ng's supported platforms either have
unistd.h or define _WIN32.

test/fuzz/fuzzer_minigzip.c
test/minigzip.c

index 3f58f4a299dcd8fdf763b820277998c07cfe8d1a..3e44cd323108803d40b75d4da284a7fe7e611210 100644 (file)
 #  define snprintf _snprintf
 #endif
 
-#if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE)
-#ifndef _WIN32 /* unlink already in stdio.h for Win32 */
-extern int unlink (const char *);
-#endif
-#endif
-
 #ifndef GZ_SUFFIX
 #  define GZ_SUFFIX ".gz"
 #endif
index 9f86018a6bc13ef8e94cb93a048ea803380fcc21..0c120aad10894e2d8fb92bb63c4aaaa6a8711d50 100644 (file)
 #  define snprintf _snprintf
 #endif
 
-#if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE)
-#ifndef _WIN32 /* unlink already in stdio.h for Win32 */
-extern int unlink (const char *);
-#endif
-#endif
-
 #ifndef GZ_SUFFIX
 #  define GZ_SUFFIX ".gz"
 #endif