summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2003-02-16 17:29:11 +0000
committernectar <nectar@FreeBSD.org>2003-02-16 17:29:11 +0000
commit832e8b7f9a7422b49453b7e389ec411d3037a50f (patch)
tree3b5579370346d51f378192429db2130e5e82a6e4
parent81da3fbe2a40d9b80c8e96af564180f8aa22074e (diff)
downloadFreeBSD-src-832e8b7f9a7422b49453b7e389ec411d3037a50f.zip
FreeBSD-src-832e8b7f9a7422b49453b7e389ec411d3037a50f.tar.gz
Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go).
Only warnings that could be fixed without changing the generated object code and without restructuring the source code have been handled. Reviewed by: /sbin/md5
-rw-r--r--lib/libc/db/btree/bt_put.c3
-rw-r--r--lib/libc/db/btree/bt_split.c4
-rw-r--r--lib/libc/db/hash/hash_bigkey.c3
-rw-r--r--lib/libc/db/hash/hash_func.c6
-rw-r--r--lib/libc/db/recno/rec_close.c3
-rw-r--r--lib/libc/db/recno/rec_seq.c5
-rw-r--r--lib/libc/gen/getgrouplist.c2
-rw-r--r--lib/libc/gen/getpwent.c5
-rw-r--r--lib/libc/gen/sem.c2
-rw-r--r--lib/libc/gen/semctl.c2
-rw-r--r--lib/libc/gen/sysctl.c3
-rw-r--r--lib/libc/gen/unvis.c2
-rw-r--r--lib/libc/i386/gen/signalcontext.c1
-rw-r--r--lib/libc/i386/sys/i386_get_ioperm.c2
-rw-r--r--lib/libc/i386/sys/i386_get_ldt.c2
-rw-r--r--lib/libc/i386/sys/i386_set_ioperm.c2
-rw-r--r--lib/libc/i386/sys/i386_set_ldt.c2
-rw-r--r--lib/libc/i386/sys/i386_vm86.c2
-rw-r--r--lib/libc/include/namespace.h2
-rw-r--r--lib/libc/include/un-namespace.h2
-rw-r--r--lib/libc/net/if_nametoindex.c3
-rw-r--r--lib/libc/net/name6.c6
-rw-r--r--lib/libc/net/res_query.c1
-rw-r--r--lib/libc/posix1e/mac_exec.c3
-rw-r--r--lib/libc/posix1e/mac_get.c6
-rw-r--r--lib/libc/regex/engine.c6
-rw-r--r--lib/libc/regex/regcomp.c4
-rw-r--r--lib/libc/regex/regexec.c2
-rw-r--r--lib/libc/rpc/crypt_client.c1
-rw-r--r--lib/libc/rpc/getnetconfig.c1
-rw-r--r--lib/libc/rpc/mt_misc.c1
-rw-r--r--lib/libc/stdio/mktemp.c4
-rw-r--r--lib/libc/stdtime/asctime.c4
-rw-r--r--lib/libc/stdtime/difftime.c4
-rw-r--r--lib/libc/stdtime/localtime.c4
-rw-r--r--lib/libc/stdtime/strptime.c6
-rw-r--r--lib/libc/sys/sem.c2
37 files changed, 74 insertions, 39 deletions
diff --git a/lib/libc/db/btree/bt_put.c b/lib/libc/db/btree/bt_put.c
index 4e1e89b..ea12bc0 100644
--- a/lib/libc/db/btree/bt_put.c
+++ b/lib/libc/db/btree/bt_put.c
@@ -225,7 +225,7 @@ delete: if (__bt_dleaf(t, key, h, index) == RET_ERROR) {
t->bt_cursor.pg.pgno == h->pgno && t->bt_cursor.pg.index >= index)
++t->bt_cursor.pg.index;
- if (t->bt_order == NOT)
+ if (t->bt_order == NOT) {
if (h->nextpg == P_INVALID) {
if (index == NEXTINDEX(h) - 1) {
t->bt_order = FORWARD;
@@ -239,6 +239,7 @@ delete: if (__bt_dleaf(t, key, h, index) == RET_ERROR) {
t->bt_last.pgno = h->pgno;
}
}
+ }
mpool_put(t->bt_mp, h, MPOOL_DIRTY);
diff --git a/lib/libc/db/btree/bt_split.c b/lib/libc/db/btree/bt_split.c
index d9ec874..9112ec8 100644
--- a/lib/libc/db/btree/bt_split.c
+++ b/lib/libc/db/btree/bt_split.c
@@ -672,8 +672,8 @@ bt_psplit(t, h, l, r, pskip, ilen)
* where we decide to try and copy too much onto the left page.
* Make sure that doesn't happen.
*/
- if (skip <= off &&
- used + nbytes + sizeof(indx_t) >= full || nxt == top - 1) {
+ if ((skip <= off && used + nbytes + sizeof(indx_t) >= full)
+ || nxt == top - 1) {
--off;
break;
}
diff --git a/lib/libc/db/hash/hash_bigkey.c b/lib/libc/db/hash/hash_bigkey.c
index 3465802..c70b375 100644
--- a/lib/libc/db/hash/hash_bigkey.c
+++ b/lib/libc/db/hash/hash_bigkey.c
@@ -123,7 +123,7 @@ __big_insert(hashp, bufp, key, val)
if (!bufp)
return (-1);
n = p[0];
- if (!key_size)
+ if (!key_size) {
if (FREESPACE(p)) {
move_bytes = MIN(FREESPACE(p), val_size);
off = OFFSET(p) - move_bytes;
@@ -136,6 +136,7 @@ __big_insert(hashp, bufp, key, val)
OFFSET(p) = off;
} else
p[n - 2] = FULL_KEY;
+ }
p = (u_int16_t *)bufp->page;
cp = bufp->page;
bufp->flags |= BUF_MOD;
diff --git a/lib/libc/db/hash/hash_func.c b/lib/libc/db/hash/hash_func.c
index fd5f365..194c872 100644
--- a/lib/libc/db/hash/hash_func.c
+++ b/lib/libc/db/hash/hash_func.c
@@ -47,9 +47,9 @@ __FBSDID("$FreeBSD$");
#include "page.h"
#include "extern.h"
-static u_int32_t hash1(const void *, size_t);
-static u_int32_t hash2(const void *, size_t);
-static u_int32_t hash3(const void *, size_t);
+static u_int32_t hash1(const void *, size_t) __unused;
+static u_int32_t hash2(const void *, size_t) __unused;
+static u_int32_t hash3(const void *, size_t) __unused;
static u_int32_t hash4(const void *, size_t);
/* Global default hash function */
diff --git a/lib/libc/db/recno/rec_close.c b/lib/libc/db/recno/rec_close.c
index 2246c5b..326a943 100644
--- a/lib/libc/db/recno/rec_close.c
+++ b/lib/libc/db/recno/rec_close.c
@@ -83,13 +83,14 @@ __rec_close(dbp)
if (F_ISSET(t, R_MEMMAPPED) && munmap(t->bt_smap, t->bt_msize))
status = RET_ERROR;
- if (!F_ISSET(t, R_INMEM))
+ if (!F_ISSET(t, R_INMEM)) {
if (F_ISSET(t, R_CLOSEFP)) {
if (fclose(t->bt_rfp))
status = RET_ERROR;
} else
if (_close(t->bt_rfd))
status = RET_ERROR;
+ }
if (__bt_close(dbp) == RET_ERROR)
status = RET_ERROR;
diff --git a/lib/libc/db/recno/rec_seq.c b/lib/libc/db/recno/rec_seq.c
index bf95b8c..b75d44e 100644
--- a/lib/libc/db/recno/rec_seq.c
+++ b/lib/libc/db/recno/rec_seq.c
@@ -31,10 +31,11 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
-static char sccsid[] = "@(#)rec_seq.c 8.3 (Berkeley) 7/14/94";
+/* XXX use __SCCSID */
+static char sccsid[] __unused = "@(#)rec_seq.c 8.3 (Berkeley) 7/14/94";
#endif /* not lint */
-#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
diff --git a/lib/libc/gen/getgrouplist.c b/lib/libc/gen/getgrouplist.c
index 52ee620..40d55fc 100644
--- a/lib/libc/gen/getgrouplist.c
+++ b/lib/libc/gen/getgrouplist.c
@@ -69,7 +69,7 @@ getgrouplist(uname, agroup, groups, grpcnt)
* Scan the group file to find additional groups.
*/
setgrent();
- while (grp = getgrent()) {
+ while ((grp = getgrent()) != NULL) {
for (i = 0; i < ngroups; i++) {
if (grp->gr_gid == groups[i])
goto skip;
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c
index a3bfed8..cf7c644 100644
--- a/lib/libc/gen/getpwent.c
+++ b/lib/libc/gen/getpwent.c
@@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <limits.h>
#include <nsswitch.h>
+#include <netdb.h>
#ifdef HESIOD
#include <hesiod.h>
#endif
@@ -64,10 +65,6 @@ __FBSDID("$FreeBSD$");
#endif
#include "un-namespace.h"
-extern void setnetgrent(char *);
-extern int getnetgrent(char **, char **, char **);
-extern int innetgr(const char *, const char *, const char *, const char *);
-
#include "pw_scan.h"
#if defined(YP) || defined(HESIOD)
diff --git a/lib/libc/gen/sem.c b/lib/libc/gen/sem.c
index d1cf10e..e37eccd 100644
--- a/lib/libc/gen/sem.c
+++ b/lib/libc/gen/sem.c
@@ -29,6 +29,7 @@
* $FreeBSD$
*/
+#include "namespace.h"
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
@@ -37,6 +38,7 @@
#include <pthread.h>
#include <sys/queue.h>
#include <_semaphore.h>
+#include "un-namespace.h"
#define _SEM_CHECK_VALIDITY(sem) \
if ((*(sem))->magic != SEM_MAGIC) { \
diff --git a/lib/libc/gen/semctl.c b/lib/libc/gen/semctl.c
index 0322743..4b5283f 100644
--- a/lib/libc/gen/semctl.c
+++ b/lib/libc/gen/semctl.c
@@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$");
#include <stdarg.h>
#include <stdlib.h>
+extern int __semctl(int semid, int semnum, int cmd, union semun *arg);
+
int semctl(int semid, int semnum, int cmd, ...)
{
va_list ap;
diff --git a/lib/libc/gen/sysctl.c b/lib/libc/gen/sysctl.c
index ad39ff6..525175a1 100644
--- a/lib/libc/gen/sysctl.c
+++ b/lib/libc/gen/sysctl.c
@@ -47,6 +47,9 @@ __FBSDID("$FreeBSD$");
#include <unistd.h>
#include <string.h>
+extern int __sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp,
+ void *newp, size_t newlen);
+
int
sysctl(name, namelen, oldp, oldlenp, newp, newlen)
int *name;
diff --git a/lib/libc/gen/unvis.c b/lib/libc/gen/unvis.c
index df6b18f..94a6726 100644
--- a/lib/libc/gen/unvis.c
+++ b/lib/libc/gen/unvis.c
@@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
#define S_HTTP 0x080 /* %HEXHEX escape */
#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
-#define ishex(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '9' || ((u_char)(c)) >= 'a' && ((u_char)(c)) <= 'f')
+#define ishex(c) ((((u_char)(c)) >= '0' && ((u_char)(c)) <= '9') || (((u_char)(c)) >= 'a' && ((u_char)(c)) <= 'f'))
/*
* unvis - decode characters previously encoded by vis
diff --git a/lib/libc/i386/gen/signalcontext.c b/lib/libc/i386/gen/signalcontext.c
index 9d51b73..a66e2db 100644
--- a/lib/libc/i386/gen/signalcontext.c
+++ b/lib/libc/i386/gen/signalcontext.c
@@ -34,6 +34,7 @@ __FBSDID("$FreeBSD");
#include <machine/psl.h>
#include <machine/sigframe.h>
#include <signal.h>
+#include <strings.h>
__weak_reference(__signalcontext, signalcontext);
diff --git a/lib/libc/i386/sys/i386_get_ioperm.c b/lib/libc/i386/sys/i386_get_ioperm.c
index 5fe245a..30c050c 100644
--- a/lib/libc/i386/sys/i386_get_ioperm.c
+++ b/lib/libc/i386/sys/i386_get_ioperm.c
@@ -29,6 +29,8 @@ __FBSDID("$FreeBSD$");
#include <machine/sysarch.h>
+extern int sysarch(int op, char *parms);
+
int
i386_get_ioperm(unsigned int start, unsigned int *length, int *enable)
{
diff --git a/lib/libc/i386/sys/i386_get_ldt.c b/lib/libc/i386/sys/i386_get_ldt.c
index ec95d99..2575c3e 100644
--- a/lib/libc/i386/sys/i386_get_ldt.c
+++ b/lib/libc/i386/sys/i386_get_ldt.c
@@ -33,6 +33,8 @@ __FBSDID("$FreeBSD$");
#include <machine/segments.h>
#include <machine/sysarch.h>
+extern int sysarch(int op, char *parms);
+
int
i386_get_ldt(int start, union descriptor *descs, int num)
{
diff --git a/lib/libc/i386/sys/i386_set_ioperm.c b/lib/libc/i386/sys/i386_set_ioperm.c
index f23881d..c9ad54e 100644
--- a/lib/libc/i386/sys/i386_set_ioperm.c
+++ b/lib/libc/i386/sys/i386_set_ioperm.c
@@ -29,6 +29,8 @@ __FBSDID("$FreeBSD$");
#include <machine/sysarch.h>
+extern int sysarch(int op, char *parms);
+
int
i386_set_ioperm(unsigned int start, unsigned int length, int enable)
{
diff --git a/lib/libc/i386/sys/i386_set_ldt.c b/lib/libc/i386/sys/i386_set_ldt.c
index 756d49d..9693791 100644
--- a/lib/libc/i386/sys/i386_set_ldt.c
+++ b/lib/libc/i386/sys/i386_set_ldt.c
@@ -33,6 +33,8 @@ __FBSDID("$FreeBSD$");
#include <machine/segments.h>
#include <machine/sysarch.h>
+extern int sysarch(int op, char *parms);
+
int
i386_set_ldt(int start, union descriptor *descs, int num)
{
diff --git a/lib/libc/i386/sys/i386_vm86.c b/lib/libc/i386/sys/i386_vm86.c
index 6abff2d..16fe3b3 100644
--- a/lib/libc/i386/sys/i386_vm86.c
+++ b/lib/libc/i386/sys/i386_vm86.c
@@ -29,6 +29,8 @@ __FBSDID("$FreeBSD$");
#include <machine/sysarch.h>
+extern int sysarch(int op, char *parms);
+
int
i386_vm86(int fcn, void *data)
{
diff --git a/lib/libc/include/namespace.h b/lib/libc/include/namespace.h
index f9f5fd7..f3b430e 100644
--- a/lib/libc/include/namespace.h
+++ b/lib/libc/include/namespace.h
@@ -63,6 +63,7 @@
#define fcntl _fcntl
/*#define flock _flock */
#define flockfile _flockfile
+#define fpathconf _fpathconf
#define fstat _fstat
#define fstatfs _fstatfs
#define fsync _fsync
@@ -139,7 +140,6 @@
#define creat _creat
#define fchflags _fchflags
#define fchmod _fchmod
-#define fpathconf _fpathconf
#define ftrylockfile _ftrylockfile
#define msync _msync
#define nfssvc _nfssvc
diff --git a/lib/libc/include/un-namespace.h b/lib/libc/include/un-namespace.h
index 4bf789d..a5cb05f 100644
--- a/lib/libc/include/un-namespace.h
+++ b/lib/libc/include/un-namespace.h
@@ -45,6 +45,7 @@
#undef fcntl
#undef flock
#undef flockfile
+#undef fpathconf
#undef fstat
#undef fstatfs
#undef fsync
@@ -113,7 +114,6 @@
#undef creat
#undef fchflags
#undef fchmod
-#undef fpathconf
#undef ftrylockfile
#undef msync
#undef nfssvc
diff --git a/lib/libc/net/if_nametoindex.c b/lib/libc/net/if_nametoindex.c
index f4748ca..d0ca521 100644
--- a/lib/libc/net/if_nametoindex.c
+++ b/lib/libc/net/if_nametoindex.c
@@ -28,6 +28,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "namespace.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/sockio.h>
@@ -37,6 +38,8 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <string.h>
#include <errno.h>
+#include <unistd.h>
+#include "un-namespace.h"
/*
* From RFC 2553:
diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c
index ca4acb3..ae9eb31 100644
--- a/lib/libc/net/name6.c
+++ b/lib/libc/net/name6.c
@@ -177,16 +177,14 @@ static int _mapped_addr_enabled(void);
static FILE *_files_open(int *errp);
static int _files_ghbyname(void *, void *, va_list);
static int _files_ghbyaddr(void *, void *, va_list);
-static void _files_shent(int stayopen);
-static void _files_ehent(void);
#ifdef YP
static int _nis_ghbyname(void *, void *, va_list);
static int _nis_ghbyaddr(void *, void *, va_list);
#endif
static int _dns_ghbyname(void *, void *, va_list);
static int _dns_ghbyaddr(void *, void *, va_list);
-static void _dns_shent(int stayopen);
-static void _dns_ehent(void);
+static void _dns_shent(int stayopen) __unused;
+static void _dns_ehent(void) __unused;
#ifdef ICMPNL
static int _icmp_ghbyaddr(void *, void *, va_list);
#endif /* ICMPNL */
diff --git a/lib/libc/net/res_query.c b/lib/libc/net/res_query.c
index 4dde3e4..cd3c832 100644
--- a/lib/libc/net/res_query.c
+++ b/lib/libc/net/res_query.c
@@ -87,6 +87,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include "res_config.h"
diff --git a/lib/libc/posix1e/mac_exec.c b/lib/libc/posix1e/mac_exec.c
index b89a73e..fb3f994 100644
--- a/lib/libc/posix1e/mac_exec.c
+++ b/lib/libc/posix1e/mac_exec.c
@@ -34,6 +34,9 @@
#include <sys/types.h>
#include <sys/mac.h>
+extern int __mac_execve(char *fname, char **argv, char **envv,
+ struct mac *mac_p);
+
int
mac_execve(char *fname, char **argv, char **envv, struct mac *label)
{
diff --git a/lib/libc/posix1e/mac_get.c b/lib/libc/posix1e/mac_get.c
index c5f11f3..7c8f790 100644
--- a/lib/libc/posix1e/mac_get.c
+++ b/lib/libc/posix1e/mac_get.c
@@ -37,6 +37,12 @@
#include <errno.h>
#include <stdlib.h>
+extern int __mac_get_fd(int fd, struct mac *mac_p);
+extern int __mac_get_file(const char *path_p, struct mac *mac_p);
+extern int __mac_get_link(const char *path_p, struct mac *mac_p);
+extern int __mac_get_pid(pid_t pid, struct mac *mac_p);
+extern int __mac_get_proc(struct mac *mac_p);
+
int
mac_get_fd(int fd, struct mac *label)
{
diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c
index a5f39de..9d69c1e 100644
--- a/lib/libc/regex/engine.c
+++ b/lib/libc/regex/engine.c
@@ -186,8 +186,8 @@ int eflags;
pp = mustlast;
for (dp = start+g->mlen-1; dp < stop;) {
/* Fast skip non-matches */
- while (dp < stop && charjump[*dp])
- dp += charjump[*dp];
+ while (dp < stop && charjump[(int)*dp])
+ dp += charjump[(int)*dp];
if (dp >= stop)
break;
@@ -203,7 +203,7 @@ int eflags;
/* Jump to next possible match */
mj = matchjump[pp - mustfirst];
- cj = charjump[*dp];
+ cj = charjump[(int)*dp];
dp += (cj < mj ? mj : cj);
pp = mustlast;
}
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c
index 07c3955..e342fda 100644
--- a/lib/libc/regex/regcomp.c
+++ b/lib/libc/regex/regcomp.c
@@ -106,7 +106,7 @@ static void freeset(struct parse *p, cset *cs);
static int freezeset(struct parse *p, cset *cs);
static int firstch(struct parse *p, cset *cs);
static int nch(struct parse *p, cset *cs);
-static void mcadd(struct parse *p, cset *cs, char *cp);
+static void mcadd(struct parse *p, cset *cs, char *cp) __unused;
#if used
static void mcsub(cset *cs, char *cp);
static int mcin(cset *cs, char *cp);
@@ -1964,7 +1964,7 @@ struct re_guts *g;
* is the first one that would be matched).
*/
for (mindex = 0; mindex < g->mlen; mindex++)
- g->charjump[g->must[mindex]] = g->mlen - mindex - 1;
+ g->charjump[(int)g->must[mindex]] = g->mlen - mindex - 1;
}
/*
diff --git a/lib/libc/regex/regexec.c b/lib/libc/regex/regexec.c
index abbd9ba..c13c72d 100644
--- a/lib/libc/regex/regexec.c
+++ b/lib/libc/regex/regexec.c
@@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$");
#include "utils.h"
#include "regex2.h"
-static int nope = 0; /* for use in asserts; shuts lint up */
+static int nope __unused = 0; /* for use in asserts; shuts lint up */
/* macros for manipulating states, small version */
#define states long
diff --git a/lib/libc/rpc/crypt_client.c b/lib/libc/rpc/crypt_client.c
index 652a49b..255b266 100644
--- a/lib/libc/rpc/crypt_client.c
+++ b/lib/libc/rpc/crypt_client.c
@@ -34,6 +34,7 @@
__FBSDID("$FreeBSD$");
#include "namespace.h"
+#include <err.h>
#include <sys/types.h>
#include <rpc/des_crypt.h>
#include <rpc/des.h>
diff --git a/lib/libc/rpc/getnetconfig.c b/lib/libc/rpc/getnetconfig.c
index 0e77419..dae03b8 100644
--- a/lib/libc/rpc/getnetconfig.c
+++ b/lib/libc/rpc/getnetconfig.c
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <string.h>
#include <rpc/rpc.h>
+#include <unistd.h>
#include "un-namespace.h"
#include "rpc_com.h"
diff --git a/lib/libc/rpc/mt_misc.c b/lib/libc/rpc/mt_misc.c
index 95edac4..023ec6a 100644
--- a/lib/libc/rpc/mt_misc.c
+++ b/lib/libc/rpc/mt_misc.c
@@ -10,6 +10,7 @@ __FBSDID("$FreeBSD$");
#include <rpc/rpc.h>
#include <sys/time.h>
#include <stdlib.h>
+#include <string.h>
#include "un-namespace.h"
/* protects the services list (svc.c) */
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c
index ca99cf6..3bfad9d 100644
--- a/lib/libc/stdio/mktemp.c
+++ b/lib/libc/stdio/mktemp.c
@@ -37,7 +37,7 @@ static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93";
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-/* #include "namespace.h" */
+#include "namespace.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <ctype.h>
#include <unistd.h>
-/* #include "un-namespace.h" */
+#include "un-namespace.h"
char *_mktemp(char *);
diff --git a/lib/libc/stdtime/asctime.c b/lib/libc/stdtime/asctime.c
index 49cbc1d..4fd130b 100644
--- a/lib/libc/stdtime/asctime.c
+++ b/lib/libc/stdtime/asctime.c
@@ -3,12 +3,12 @@
** June 5, 1996 by Arthur David Olson (arthur_david_olson@nih.gov).
*/
+#include <sys/cdefs.h>
#ifndef lint
#ifndef NOID
-static char elsieid[] = "@(#)asctime.c 7.7";
+static char elsieid[] __unused = "@(#)asctime.c 7.7";
#endif /* !defined NOID */
#endif /* !defined lint */
-#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
/*LINTLIBRARY*/
diff --git a/lib/libc/stdtime/difftime.c b/lib/libc/stdtime/difftime.c
index 59368e4..c79891c 100644
--- a/lib/libc/stdtime/difftime.c
+++ b/lib/libc/stdtime/difftime.c
@@ -3,12 +3,12 @@
** June 5, 1996 by Arthur David Olson (arthur_david_olson@nih.gov).
*/
+#include <sys/cdefs.h>
#ifndef lint
#ifndef NOID
-static char elsieid[] = "@(#)difftime.c 7.7";
+static char elsieid[] __unused = "@(#)difftime.c 7.7";
#endif /* !defined NOID */
#endif /* !defined lint */
-#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
/*LINTLIBRARY*/
diff --git a/lib/libc/stdtime/localtime.c b/lib/libc/stdtime/localtime.c
index a82256e..501930e 100644
--- a/lib/libc/stdtime/localtime.c
+++ b/lib/libc/stdtime/localtime.c
@@ -3,12 +3,12 @@
** June 5, 1996 by Arthur David Olson (arthur_david_olson@nih.gov).
*/
+#include <sys/cdefs.h>
#ifndef lint
#ifndef NOID
-static char elsieid[] = "@(#)localtime.c 7.57";
+static char elsieid[] __unused = "@(#)localtime.c 7.57";
#endif /* !defined NOID */
#endif /* !defined lint */
-#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
/*
diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c
index edb0d3c..904c388 100644
--- a/lib/libc/stdtime/strptime.c
+++ b/lib/libc/stdtime/strptime.c
@@ -51,14 +51,14 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
#ifndef NOID
-static char copyright[] =
+static char copyright[] __unused =
"@(#) Copyright (c) 1994 Powerdog Industries. All rights reserved.";
-static char sccsid[] = "@(#)strptime.c 0.1 (Powerdog) 94/03/27";
+static char sccsid[] __unused = "@(#)strptime.c 0.1 (Powerdog) 94/03/27";
#endif /* !defined NOID */
#endif /* not lint */
-#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "namespace.h"
diff --git a/lib/libc/sys/sem.c b/lib/libc/sys/sem.c
index d1cf10e..e37eccd 100644
--- a/lib/libc/sys/sem.c
+++ b/lib/libc/sys/sem.c
@@ -29,6 +29,7 @@
* $FreeBSD$
*/
+#include "namespace.h"
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
@@ -37,6 +38,7 @@
#include <pthread.h>
#include <sys/queue.h>
#include <_semaphore.h>
+#include "un-namespace.h"
#define _SEM_CHECK_VALIDITY(sem) \
if ((*(sem))->magic != SEM_MAGIC) { \
OpenPOWER on IntegriCloud