Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Sep 2015 20:28:50 +0000 (UTC)
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r288033 - head/lib/libc/stdio
Message-ID:  <201509202028.t8KKSoJG086271@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rodrigc
Date: Sun Sep 20 20:28:49 2015
New Revision: 288033
URL: https://svnweb.freebsd.org/changeset/base/288033

Log:
  Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

Modified:
  head/lib/libc/stdio/findfp.c
  head/lib/libc/stdio/getchar.c
  head/lib/libc/stdio/vfscanf.c

Modified: head/lib/libc/stdio/findfp.c
==============================================================================
--- head/lib/libc/stdio/findfp.c	Sun Sep 20 20:27:57 2015	(r288032)
+++ head/lib/libc/stdio/findfp.c	Sun Sep 20 20:28:49 2015	(r288033)
@@ -113,7 +113,7 @@ moreglue(int n)
  * Find a free FILE for fopen et al.
  */
 FILE *
-__sfp()
+__sfp(void)
 {
 	FILE	*fp;
 	int	n;
@@ -164,7 +164,7 @@ found:
  */
 __warn_references(f_prealloc, 
 	"warning: this program uses f_prealloc(), which is not recommended.");
-void f_prealloc_void();
+void f_prealloc(void);
 
 void
 f_prealloc(void)
@@ -196,7 +196,7 @@ f_prealloc(void)
  * The name `_cleanup' is, alas, fairly well known outside stdio.
  */
 void
-_cleanup()
+_cleanup(void)
 {
 	/* (void) _fwalk(fclose); */
 	(void) _fwalk(__sflush);		/* `cheating' */
@@ -206,7 +206,7 @@ _cleanup()
  * __sinit() is called whenever stdio's internal variables must be set up.
  */
 void
-__sinit()
+__sinit(void)
 {
 
 	/* Make sure we clean up on exit. */

Modified: head/lib/libc/stdio/getchar.c
==============================================================================
--- head/lib/libc/stdio/getchar.c	Sun Sep 20 20:27:57 2015	(r288032)
+++ head/lib/libc/stdio/getchar.c	Sun Sep 20 20:28:49 2015	(r288033)
@@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
 #undef getchar_unlocked
 
 int
-getchar()
+getchar(void)
 {
 	int retval;
 	FLOCKFILE(stdin);

Modified: head/lib/libc/stdio/vfscanf.c
==============================================================================
--- head/lib/libc/stdio/vfscanf.c	Sun Sep 20 20:27:57 2015	(r288032)
+++ head/lib/libc/stdio/vfscanf.c	Sun Sep 20 20:28:49 2015	(r288033)
@@ -814,9 +814,7 @@ match_failure:
  * considered part of the scanset.
  */
 static const u_char *
-__sccl(tab, fmt)
-	char *tab;
-	const u_char *fmt;
+__sccl(char *tab, const u_char *fmt)
 {
 	int c, n, v, i;
 	struct xlocale_collate *table =



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509202028.t8KKSoJG086271>