Module Name: src
Committed By: lukem
Date: Sun Apr 12 14:23:30 UTC 2009
Modified Files:
src/usr.bin/mkdep: Makefile findcc.c mkdep.c
Log Message:
fix -Wcast-qual & -Wsign-compare issues
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/mkdep/Makefile
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/mkdep/findcc.c
cvs rdiff -u -r1.32 -r1.33 src/usr.bin/mkdep/mkdep.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.bin/mkdep/Makefile
diff -u src/usr.bin/mkdep/Makefile:1.16 src/usr.bin/mkdep/Makefile:1.17
--- src/usr.bin/mkdep/Makefile:1.16 Fri Feb 13 16:02:05 2009
+++ src/usr.bin/mkdep/Makefile Sun Apr 12 14:23:30 2009
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.16 2009/02/13 16:02:05 uebayasi Exp $
+# $NetBSD: Makefile,v 1.17 2009/04/12 14:23:30 lukem Exp $
# @(#)Makefile 8.1 (Berkeley) 6/6/93
#CFLAGS+=-g
MAN= mkdep.1
PROG= mkdep
SRCS= mkdep.c findcc.c
-WARNS= 3
.include <bsd.prog.mk>
Index: src/usr.bin/mkdep/findcc.c
diff -u src/usr.bin/mkdep/findcc.c:1.4 src/usr.bin/mkdep/findcc.c:1.5
--- src/usr.bin/mkdep/findcc.c:1.4 Mon Jul 21 14:19:24 2008
+++ src/usr.bin/mkdep/findcc.c Sun Apr 12 14:23:30 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: findcc.c,v 1.4 2008/07/21 14:19:24 lukem Exp $ */
+/* $NetBSD: findcc.c,v 1.5 2009/04/12 14:23:30 lukem Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#if !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1999 The NetBSD Foundation, Inc.\
All rights reserved.");
-__RCSID("$NetBSD: findcc.c,v 1.4 2008/07/21 14:19:24 lukem Exp $");
+__RCSID("$NetBSD: findcc.c,v 1.5 2009/04/12 14:23:30 lukem Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -72,7 +72,7 @@
*next++ = '\0';
if (snprintf(buffer, sizeof(buffer),
- "%s/%s", dir, progname) < sizeof(buffer)) {
+ "%s/%s", dir, progname) < (int)sizeof(buffer)) {
if (!access(buffer, X_OK)) {
free(path);
return strdup(buffer);
Index: src/usr.bin/mkdep/mkdep.c
diff -u src/usr.bin/mkdep/mkdep.c:1.32 src/usr.bin/mkdep/mkdep.c:1.33
--- src/usr.bin/mkdep/mkdep.c:1.32 Mon Jul 21 14:19:24 2008
+++ src/usr.bin/mkdep/mkdep.c Sun Apr 12 14:23:30 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mkdep.c,v 1.32 2008/07/21 14:19:24 lukem Exp $ */
+/* $NetBSD: mkdep.c,v 1.33 2009/04/12 14:23:30 lukem Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#if !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1999 The NetBSD Foundation, Inc.\
All rights reserved.");
-__RCSID("$NetBSD: mkdep.c,v 1.32 2008/07/21 14:19:24 lukem Exp $");
+__RCSID("$NetBSD: mkdep.c,v 1.33 2009/04/12 14:23:30 lukem Exp $");
#endif /* not lint */
#include <sys/mman.h>
@@ -65,7 +65,7 @@
};
typedef struct {
- int len;
+ size_t len;
char suff[12];
} suff_list_t;
@@ -191,7 +191,7 @@
int dependfile;
char *buf, *lim, *ptr, *line, *suf, *colon, *eol;
int ok_ind, ch;
- int sz;
+ size_t sz;
int fd;
const char *fname;
const char *suffixes = NULL, *s;