summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorjraynard <jraynard@FreeBSD.org>1996-06-12 22:59:55 +0000
committerjraynard <jraynard@FreeBSD.org>1996-06-12 22:59:55 +0000
commite85e320a9e0511f35e7d9e062f18561014e59770 (patch)
treecfe4e5c175af1b86f8edd90380fb043a65690b52 /lib
parent4a395602dc927c2e081ae681cefecd87fe5ca3b1 (diff)
downloadFreeBSD-src-e85e320a9e0511f35e7d9e062f18561014e59770.zip
FreeBSD-src-e85e320a9e0511f35e7d9e062f18561014e59770.tar.gz
Code cleanup:-
The usual stuff, adding missing function prototypes, argument types, return values, etc. This directory now compiles with no warnings with -Wall on gcc2.6.3!
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdio/stdio.c6
-rw-r--r--lib/libc/stdio/tempnam.c12
-rw-r--r--lib/libc/stdio/vfscanf.c2
-rw-r--r--lib/libc/stdio/vprintf.c2
-rw-r--r--lib/libc/stdio/wbuf.c2
-rw-r--r--lib/libc/stdio/wsetup.c2
6 files changed, 13 insertions, 13 deletions
diff --git a/lib/libc/stdio/stdio.c b/lib/libc/stdio/stdio.c
index c2d7d87..c3b7e51 100644
--- a/lib/libc/stdio/stdio.c
+++ b/lib/libc/stdio/stdio.c
@@ -47,7 +47,7 @@ static char sccsid[] = "@(#)stdio.c 8.1 (Berkeley) 6/4/93";
* Small standard I/O/seek/close functions.
* These maintain the `known seek offset' for seek optimisation.
*/
-__sread(cookie, buf, n)
+int __sread(cookie, buf, n)
void *cookie;
char *buf;
int n;
@@ -64,7 +64,7 @@ __sread(cookie, buf, n)
return (ret);
}
-__swrite(cookie, buf, n)
+int __swrite(cookie, buf, n)
void *cookie;
char const *buf;
int n;
@@ -96,7 +96,7 @@ __sseek(cookie, offset, whence)
return (ret);
}
-__sclose(cookie)
+int __sclose(cookie)
void *cookie;
{
diff --git a/lib/libc/stdio/tempnam.c b/lib/libc/stdio/tempnam.c
index 6644ae5..0407e8bb1 100644
--- a/lib/libc/stdio/tempnam.c
+++ b/lib/libc/stdio/tempnam.c
@@ -55,28 +55,28 @@ tempnam(dir, pfx)
if (!pfx)
pfx = "tmp.";
- if (f = getenv("TMPDIR")) {
+ if ((f = getenv("TMPDIR"))) {
(void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXX", f,
*(f + strlen(f) - 1) == '/'? "": "/", pfx);
- if (f = mktemp(name))
+ if ((f = mktemp(name)))
return(f);
}
- if (f = (char *)dir) {
+ if ((f = (char *)dir)) {
(void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXX", f,
*(f + strlen(f) - 1) == '/'? "": "/", pfx);
- if (f = mktemp(name))
+ if ((f = mktemp(name)))
return(f);
}
f = P_tmpdir;
(void)snprintf(name, MAXPATHLEN, "%s%sXXXXXX", f, pfx);
- if (f = mktemp(name))
+ if ((f = mktemp(name)))
return(f);
f = _PATH_TMP;
(void)snprintf(name, MAXPATHLEN, "%s%sXXXXXX", f, pfx);
- if (f = mktemp(name))
+ if ((f = mktemp(name)))
return(f);
sverrno = errno;
diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c
index 22ed5a0..f975341 100644
--- a/lib/libc/stdio/vfscanf.c
+++ b/lib/libc/stdio/vfscanf.c
@@ -94,7 +94,7 @@ static u_char *__sccl();
/*
* vfscanf
*/
-__svfscanf(fp, fmt0, ap)
+int __svfscanf(fp, fmt0, ap)
register FILE *fp;
char const *fmt0;
va_list ap;
diff --git a/lib/libc/stdio/vprintf.c b/lib/libc/stdio/vprintf.c
index f8184bb..069411e 100644
--- a/lib/libc/stdio/vprintf.c
+++ b/lib/libc/stdio/vprintf.c
@@ -40,7 +40,7 @@ static char sccsid[] = "@(#)vprintf.c 8.1 (Berkeley) 6/4/93";
#include <stdio.h>
-vprintf(fmt, ap)
+int vprintf(fmt, ap)
char const *fmt;
_BSD_VA_LIST_ ap;
{
diff --git a/lib/libc/stdio/wbuf.c b/lib/libc/stdio/wbuf.c
index 36d7c8d..010539f 100644
--- a/lib/libc/stdio/wbuf.c
+++ b/lib/libc/stdio/wbuf.c
@@ -46,7 +46,7 @@ static char sccsid[] = "@(#)wbuf.c 8.1 (Berkeley) 6/4/93";
* the given file. Flush the buffer out if it is or becomes full,
* or if c=='\n' and the file is line buffered.
*/
-__swbuf(c, fp)
+int __swbuf(c, fp)
register int c;
register FILE *fp;
{
diff --git a/lib/libc/stdio/wsetup.c b/lib/libc/stdio/wsetup.c
index 1215edc..c494f69 100644
--- a/lib/libc/stdio/wsetup.c
+++ b/lib/libc/stdio/wsetup.c
@@ -47,7 +47,7 @@ static char sccsid[] = "@(#)wsetup.c 8.1 (Berkeley) 6/4/93";
* because either _flags does not include __SWR, or _buf is NULL.
* _wsetup returns 0 if OK to write, nonzero otherwise.
*/
-__swsetup(fp)
+int __swsetup(fp)
register FILE *fp;
{
/* make sure stdio is set up */
OpenPOWER on IntegriCloud