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
This commit is contained in:
parent
81da3fbe2a
commit
832e8b7f9a
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -31,10 +31,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)rec_seq.c 8.3 (Berkeley) 7/14/94";
|
||||
#endif /* not lint */
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
/* XXX use __SCCSID */
|
||||
static char sccsid[] __unused = "@(#)rec_seq.c 8.3 (Berkeley) 7/14/94";
|
||||
#endif /* not lint */
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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) { \
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -34,6 +34,7 @@ __FBSDID("$FreeBSD");
|
||||
#include <machine/psl.h>
|
||||
#include <machine/sigframe.h>
|
||||
#include <signal.h>
|
||||
#include <strings.h>
|
||||
|
||||
__weak_reference(__signalcontext, signalcontext);
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -29,6 +29,8 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <machine/sysarch.h>
|
||||
|
||||
extern int sysarch(int op, char *parms);
|
||||
|
||||
int
|
||||
i386_vm86(int fcn, void *data)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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 */
|
||||
|
@ -87,6 +87,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "res_config.h"
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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) */
|
||||
|
@ -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 *);
|
||||
|
||||
|
@ -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*/
|
||||
|
@ -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*/
|
||||
|
@ -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$");
|
||||
|
||||
/*
|
||||
|
@ -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"
|
||||
|
@ -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) { \
|
||||
|
Loading…
x
Reference in New Issue
Block a user