summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2004-01-06 18:26:15 +0000
committernectar <nectar@FreeBSD.org>2004-01-06 18:26:15 +0000
commitc281d0e2eafa39c917ef047ce514a5594c54b94f (patch)
treef9e401de771be36d2b425999ec8f726e406ea85d /lib/libc
parent9138480b09ae7b6db83e31894580eb4bdc8fb7fe (diff)
downloadFreeBSD-src-c281d0e2eafa39c917ef047ce514a5594c54b94f.zip
FreeBSD-src-c281d0e2eafa39c917ef047ce514a5594c54b94f.tar.gz
Remove unused variables and function declarations. Add missing headers.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/ttyname.c3
-rw-r--r--lib/libc/locale/srune.c1
-rw-r--r--lib/libc/locale/wcstold.c4
-rw-r--r--lib/libc/posix1e/mac.c3
-rw-r--r--lib/libc/stdio/vfwprintf.c3
5 files changed, 6 insertions, 8 deletions
diff --git a/lib/libc/gen/ttyname.c b/lib/libc/gen/ttyname.c
index cb5f922..e4a0ed4 100644
--- a/lib/libc/gen/ttyname.c
+++ b/lib/libc/gen/ttyname.c
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
#include "libc_private.h"
static char buf[sizeof(_PATH_DEV) + MAXNAMLEN];
-static char *oldttyname(int, struct stat *);
static char *ttyname_threaded(int fd);
static char *ttyname_unthreaded(int fd);
@@ -76,10 +75,8 @@ ttyname(int fd)
char *
ttyname_r(int fd, char *buf, size_t len)
{
- struct stat dsb;
struct stat sb;
char *rval;
- int minlen;
rval = NULL;
diff --git a/lib/libc/locale/srune.c b/lib/libc/locale/srune.c
index 86d40a7..073fd91 100644
--- a/lib/libc/locale/srune.c
+++ b/lib/libc/locale/srune.c
@@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$");
#include <limits.h>
#include <rune.h>
+#include <string.h>
#include <wchar.h>
/*
diff --git a/lib/libc/locale/wcstold.c b/lib/libc/locale/wcstold.c
index 6228784..76158c1 100644
--- a/lib/libc/locale/wcstold.c
+++ b/lib/libc/locale/wcstold.c
@@ -38,9 +38,9 @@ long double
wcstold(const wchar_t * __restrict nptr, wchar_t ** __restrict endptr)
{
long double val;
- char *buf, *end, *p;
+ char *buf, *end;
const wchar_t *wcp;
- size_t clen, len;
+ size_t len;
while (iswspace(*nptr))
nptr++;
diff --git a/lib/libc/posix1e/mac.c b/lib/libc/posix1e/mac.c
index 9d29438..ded9059 100644
--- a/lib/libc/posix1e/mac.c
+++ b/lib/libc/posix1e/mac.c
@@ -44,6 +44,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <sys/mac.h>
@@ -182,7 +183,7 @@ mac_init_internal(int ignore_errors)
return (0);
while (fgets(line, LINE_MAX, file)) {
- char *arg, *comment, *parse, *statement;
+ char *comment, *parse, *statement;
if (line[strlen(line)-1] == '\n')
line[strlen(line)-1] = '\0';
diff --git a/lib/libc/stdio/vfwprintf.c b/lib/libc/stdio/vfwprintf.c
index a679288..f069bae 100644
--- a/lib/libc/stdio/vfwprintf.c
+++ b/lib/libc/stdio/vfwprintf.c
@@ -166,8 +166,7 @@ __xfputwc(wchar_t wc, FILE *fp)
char buf[MB_LEN_MAX];
struct __suio uio;
struct __siov iov;
- size_t i, len;
- int ret;
+ size_t len;
if ((fp->_flags & __SSTR) == 0)
return (__fputwc(wc, fp));
OpenPOWER on IntegriCloud