Module Name: src
Committed By: lukem
Date: Sat Apr 18 09:18:17 UTC 2009
Modified Files:
src/usr.sbin/rbootd: bpf.c conf.c defs.h utils.c
Log Message:
Fix WARNS=4 issues (-Wsign-compare -Wcast-qual)
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/rbootd/bpf.c
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/rbootd/conf.c \
src/usr.sbin/rbootd/defs.h
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/rbootd/utils.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/rbootd/bpf.c
diff -u src/usr.sbin/rbootd/bpf.c:1.18 src/usr.sbin/rbootd/bpf.c:1.19
--- src/usr.sbin/rbootd/bpf.c:1.18 Wed Dec 1 23:13:09 2004
+++ src/usr.sbin/rbootd/bpf.c Sat Apr 18 09:18:17 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: bpf.c,v 1.18 2004/12/01 23:13:09 christos Exp $ */
+/* $NetBSD: bpf.c,v 1.19 2009/04/18 09:18:17 lukem Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -89,7 +89,7 @@
#if 0
static char sccsid[] = "@(#)bpf.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: bpf.c,v 1.18 2004/12/01 23:13:09 christos Exp $");
+__RCSID("$NetBSD: bpf.c,v 1.19 2009/04/18 09:18:17 lukem Exp $");
#endif
#endif /* not lint */
@@ -359,7 +359,7 @@
syslog(LOG_ERR,
"bpf: short packet dropped (%d of %d bytes)",
caplen, datlen);
- else if (caplen > sizeof(struct rmp_packet))
+ else if (caplen > (int)sizeof(struct rmp_packet))
syslog(LOG_ERR, "bpf: large packet dropped (%d bytes)",
caplen);
else {
Index: src/usr.sbin/rbootd/conf.c
diff -u src/usr.sbin/rbootd/conf.c:1.8 src/usr.sbin/rbootd/conf.c:1.9
--- src/usr.sbin/rbootd/conf.c:1.8 Thu Aug 7 11:25:41 2003
+++ src/usr.sbin/rbootd/conf.c Sat Apr 18 09:18:17 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: conf.c,v 1.8 2003/08/07 11:25:41 agc Exp $ */
+/* $NetBSD: conf.c,v 1.9 2009/04/18 09:18:17 lukem Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -89,7 +89,7 @@
#if 0
static char sccsid[] = "@(#)conf.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: conf.c,v 1.8 2003/08/07 11:25:41 agc Exp $");
+__RCSID("$NetBSD: conf.c,v 1.9 2009/04/18 09:18:17 lukem Exp $");
#endif
#endif /* not lint */
@@ -114,11 +114,11 @@
int DebugFlg = 0; /* set true if debugging */
int BootAny = 0; /* set true if we boot anyone */
-char *ConfigFile = NULL; /* configuration file */
-char *DfltConfig = _PATH_RBOOTDCONF; /* default configuration file */
-char *PidFile = _PATH_RBOOTDPID; /* file w/pid of server */
-char *BootDir = _PATH_RBOOTDLIB; /* directory w/boot files */
-char *DbgFile = _PATH_RBOOTDDBG; /* debug output file */
+const char *ConfigFile = NULL; /* configuration file */
+const char *DfltConfig = _PATH_RBOOTDCONF; /* default configuration file */
+const char *PidFile = _PATH_RBOOTDPID; /* file w/pid of server */
+const char *BootDir = _PATH_RBOOTDLIB; /* directory w/boot files */
+const char *DbgFile = _PATH_RBOOTDDBG; /* debug output file */
FILE *DbgFp = NULL; /* debug file pointer */
char *IntfName = NULL; /* intf we are attached to */
Index: src/usr.sbin/rbootd/defs.h
diff -u src/usr.sbin/rbootd/defs.h:1.8 src/usr.sbin/rbootd/defs.h:1.9
--- src/usr.sbin/rbootd/defs.h:1.8 Thu Aug 7 11:25:41 2003
+++ src/usr.sbin/rbootd/defs.h Sat Apr 18 09:18:17 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.8 2003/08/07 11:25:41 agc Exp $ */
+/* $NetBSD: defs.h,v 1.9 2009/04/18 09:18:17 lukem Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -170,11 +170,11 @@
extern int DebugFlg; /* set true if debugging */
extern int BootAny; /* set true if we can boot anyone */
-extern char *ConfigFile; /* configuration file */
-extern char *DfltConfig; /* default configuration file */
-extern char *DbgFile; /* debug output file */
-extern char *PidFile; /* file containing pid of server */
-extern char *BootDir; /* directory w/boot files */
+extern const char *ConfigFile; /* configuration file */
+extern const char *DfltConfig; /* default configuration file */
+extern const char *DbgFile; /* debug output file */
+extern const char *PidFile; /* file containing pid of server */
+extern const char *BootDir; /* directory w/boot files */
extern FILE *DbgFp; /* debug file pointer */
extern char *IntfName; /* interface we are attached to */
Index: src/usr.sbin/rbootd/utils.c
diff -u src/usr.sbin/rbootd/utils.c:1.15 src/usr.sbin/rbootd/utils.c:1.16
--- src/usr.sbin/rbootd/utils.c:1.15 Tue Jul 6 13:05:25 2004
+++ src/usr.sbin/rbootd/utils.c Sat Apr 18 09:18:17 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: utils.c,v 1.15 2004/07/06 13:05:25 mycroft Exp $ */
+/* $NetBSD: utils.c,v 1.16 2009/04/18 09:18:17 lukem Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -89,7 +89,7 @@
#if 0
static char sccsid[] = "@(#)utils.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: utils.c,v 1.15 2004/07/06 13:05:25 mycroft Exp $");
+__RCSID("$NetBSD: utils.c,v 1.16 2009/04/18 09:18:17 lukem Exp $");
#endif
#endif /* not lint */
@@ -294,7 +294,7 @@
u_int size;
char *flnm;
{
- int i;
+ size_t i;
(void) fprintf(DbgFp, "\n\t\tFile Name (%u): <", size);
for (i = 0; i < size; i++)