]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10011 contrib: fix old-style K&R declarations
authorSam James <sam@gentoo.org>
Thu, 9 Feb 2023 23:20:32 +0000 (23:20 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 17 Apr 2023 18:48:45 +0000 (18:48 +0000)
Removed in C23.

For more information, see LWN.net [0] or LLVM's Discourse [1], the Gentoo wiki [2],
or the (new) c-std-porting mailing list [3].

[0] https://lwn.net/Articles/913505/
[1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213
[2] https://wiki.gentoo.org/wiki/Modern_C_porting
[3] hosted at lists.linux.dev.

Signed-off-by: Sam James <sam@gentoo.org>
contrib/ldaptcl/tclAppInit.c
contrib/ldaptcl/tkAppInit.c

index f84e1826f2ebd74c796ea2492af3518de00c1565..d50a7244d8d181a50171599e736fa395cd0b3a18 100644 (file)
@@ -45,9 +45,7 @@ EXTERN int            Tcltest_Init _ANSI_ARGS_((Tcl_Interp *interp));
  */
 
 int
-main(argc, argv)
-    int argc;                  /* Number of command-line arguments. */
-    char **argv;               /* Values of command-line arguments. */
+main(int argc, char **argv)
 {
 #ifdef USE_TCLX
     TclX_Main(argc, argv, Tcl_AppInit);
index 68fd956803aad2ff478e64fa48d1a912cef7285c..693452335cd82049d1f03bcf38933d507bddd75b 100644 (file)
@@ -37,16 +37,9 @@ int (*tclDummyMathPtr)() = matherr;
  * This is the main program for the application.
  *-----------------------------------------------------------------------------
  */
-#ifdef __cplusplus
 int
 main (int    argc,
       char **argv)
-#else
-int
-main (argc, argv)
-    int    argc;
-    char **argv;
-#endif
 {
 #ifdef USE_TCLX
     TkX_Main(argc, argv, Tcl_AppInit);
@@ -68,14 +61,8 @@ main (argc, argv)
  * interp->result if an error occurs.
  *-----------------------------------------------------------------------------
  */
-#ifdef __cplusplus
 int
 Tcl_AppInit (Tcl_Interp *interp)
-#else
-int
-Tcl_AppInit (interp)
-    Tcl_Interp *interp;
-#endif
 {
     if (Tcl_Init (interp) == TCL_ERROR) {
         return TCL_ERROR;