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

This commit is contained in:
Craig Rodrigues 2015-09-20 20:28:49 +00:00
parent 4178e4b070
commit 25070501c6
3 changed files with 6 additions and 8 deletions

View File

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

View File

@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
#undef getchar_unlocked #undef getchar_unlocked
int int
getchar() getchar(void)
{ {
int retval; int retval;
FLOCKFILE(stdin); FLOCKFILE(stdin);

View File

@ -814,9 +814,7 @@ again: c = *fmt++;
* considered part of the scanset. * considered part of the scanset.
*/ */
static const u_char * static const u_char *
__sccl(tab, fmt) __sccl(char *tab, const u_char *fmt)
char *tab;
const u_char *fmt;
{ {
int c, n, v, i; int c, n, v, i;
struct xlocale_collate *table = struct xlocale_collate *table =