From 0ffb7835c78ce35ebb57ca35457b0175fadac1f2 Mon Sep 17 00:00:00 2001 From: ngie Date: Wed, 25 Nov 2015 21:43:05 +0000 Subject: [PATCH] MFC r288006,r288031,r288032,r288033: r288006 (by rodrigc): Add declarations to eliminate -Wmissing-prototypes warnings r288031 (by rodrigc): Remove names from some prototypes r288032 (by rodrigc): Remove names from some prototypes r288033 (by rodrigc): Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. git-svn-id: svn://svn.freebsd.org/base/stable/10@291336 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- lib/libc/stdio/_flock_stub.c | 3 +++ lib/libc/stdio/fgetwln.c | 2 ++ lib/libc/stdio/findfp.c | 7 ++++--- lib/libc/stdio/getchar.c | 2 +- lib/libc/stdio/vfscanf.c | 4 +--- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/libc/stdio/_flock_stub.c b/lib/libc/stdio/_flock_stub.c index 0b61315db..f53df35da 100644 --- a/lib/libc/stdio/_flock_stub.c +++ b/lib/libc/stdio/_flock_stub.c @@ -55,6 +55,9 @@ __weak_reference(_flockfile_debug_stub, _flockfile_debug); __weak_reference(_ftrylockfile, ftrylockfile); __weak_reference(_funlockfile, funlockfile); +void _flockfile_debug_stub(FILE *, char *, int); +int _ftrylockfile(FILE *); + void _flockfile(FILE *fp) { diff --git a/lib/libc/stdio/fgetwln.c b/lib/libc/stdio/fgetwln.c index 6d9087b09..843949603 100644 --- a/lib/libc/stdio/fgetwln.c +++ b/lib/libc/stdio/fgetwln.c @@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include "local.h" #include "xlocale_private.h" +wchar_t *fgetwln_l(FILE * __restrict, size_t *, locale_t); + wchar_t * fgetwln_l(FILE * __restrict fp, size_t *lenp, locale_t locale) { diff --git a/lib/libc/stdio/findfp.c b/lib/libc/stdio/findfp.c index 12d365942..b8bb5afb5 100644 --- a/lib/libc/stdio/findfp.c +++ b/lib/libc/stdio/findfp.c @@ -113,7 +113,7 @@ moreglue(int n) * Find a free FILE for fopen et al. */ FILE * -__sfp() +__sfp(void) { FILE *fp; int n; @@ -165,6 +165,7 @@ __sfp() */ __warn_references(f_prealloc, "warning: this program uses f_prealloc(), which is not recommended."); +void f_prealloc(void); void f_prealloc(void) @@ -196,7 +197,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 +207,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. */ diff --git a/lib/libc/stdio/getchar.c b/lib/libc/stdio/getchar.c index 21040bc8c..2815072f8 100644 --- a/lib/libc/stdio/getchar.c +++ b/lib/libc/stdio/getchar.c @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #undef getchar_unlocked int -getchar() +getchar(void) { int retval; FLOCKFILE(stdin); diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c index 50f0690b6..b53726318 100644 --- a/lib/libc/stdio/vfscanf.c +++ b/lib/libc/stdio/vfscanf.c @@ -814,9 +814,7 @@ again: c = *fmt++; * 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 = -- 2.45.0