summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen
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 /lib/libc/gen
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
Diffstat (limited to 'lib/libc/gen')
-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
6 files changed, 10 insertions, 6 deletions
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
OpenPOWER on IntegriCloud