[tlbuild] [PATCH 1/1] Fix -Wimplicit-int, -Wstrict-prototypes
Sam James
sam at gentoo.org
Sun Nov 6 06:27:58 CET 2022
A few more -Wimplicit-int, -Wstrict-prototypes, and -Wimplicit-function-declaration
fixes. Clang 16 makes -Wimplicit-int and -Wimplicit-function-declarations
error out by default, and -Wstrict-prototypes is futureproofing for C23.
(I've sent the relevant parts upstream for vendored projects, including
for my last changes, but it's a lot easier if fixing texlive at the same
time so I can do more builds to find more problems in other software which
depends on it.)
---
libs/freetype2/freetype-src/builds/unix/freetype2.m4 | 2 +-
libs/gd/libgd-src/tests/xpm/bug00185.c | 2 +-
texk/ps2pk/basename.c | 3 ++-
utils/m-tx/mtx-src/prepmx.c | 2 +-
utils/pmx/pmx-src/libf2c/main.c | 2 +-
5 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/libs/freetype2/freetype-src/builds/unix/freetype2.m4 b/libs/freetype2/freetype-src/builds/unix/freetype2.m4
index 0cafc8e8c..51843f5fa 100644
--- a/libs/freetype2/freetype-src/builds/unix/freetype2.m4
+++ b/libs/freetype2/freetype-src/builds/unix/freetype2.m4
@@ -121,7 +121,7 @@ AC_DEFUN([AC_CHECK_FT2],
#include <stdlib.h>
int
-main()
+main(void)
{
FT_Library library;
FT_Error error;
diff --git a/libs/gd/libgd-src/tests/xpm/bug00185.c b/libs/gd/libgd-src/tests/xpm/bug00185.c
index 3056ed950..37659d6a4 100644
--- a/libs/gd/libgd-src/tests/xpm/bug00185.c
+++ b/libs/gd/libgd-src/tests/xpm/bug00185.c
@@ -5,7 +5,7 @@
/* To check memory leaks, run such as 'valgrind --leak-check=full ./bug00185' */
int
-main()
+main(void)
{
gdImagePtr im;
char *path;
diff --git a/texk/ps2pk/basename.c b/texk/ps2pk/basename.c
index 624b74677..094ac811d 100644
--- a/texk/ps2pk/basename.c
+++ b/texk/ps2pk/basename.c
@@ -6,11 +6,12 @@
* AUTHOR: Piet Tutelaers
* VERSION: 1.0 (Sept. 1995)
*/
+#include <stdlib.h> /* exit() */
#include <stdio.h> /* printf() */
#include "basics.h" /* fatal() */
#include "filenames.h" /* basename() */
-main(int argc, char **argv)
+int main(int argc, char **argv)
{
if (argc < 2 || argc > 3)
fatal("Usage: basename string [suffix]\n");
diff --git a/utils/m-tx/mtx-src/prepmx.c b/utils/m-tx/mtx-src/prepmx.c
index 01525a129..246fec931 100644
--- a/utils/m-tx/mtx-src/prepmx.c
+++ b/utils/m-tx/mtx-src/prepmx.c
@@ -769,7 +769,7 @@ Static void topOfPMXfile(void)
}
-main(int argc, Char *argv[])
+int main(int argc, Char *argv[])
{ /* ---- Main program ------------------------ */
PASCAL_MAIN(argc, argv);
strcpy(this_version, version);
diff --git a/utils/pmx/pmx-src/libf2c/main.c b/utils/pmx/pmx-src/libf2c/main.c
index 453974904..f485a0cd0 100644
--- a/utils/pmx/pmx-src/libf2c/main.c
+++ b/utils/pmx/pmx-src/libf2c/main.c
@@ -106,7 +106,7 @@ char **xargv;
#ifdef KR_headers
main(argc, argv) int argc; char **argv;
#else
-main(int argc, char **argv)
+int main(int argc, char **argv)
#endif
{
xargc = argc;
--
2.38.1
More information about the tlbuild
mailing list.