Module Name: src
Committed By: pgoyette
Date: Fri Aug 31 02:59:37 UTC 2012
Modified Files:
src/usr.bin/make: main.c
Log Message:
Cast sizeof() to (ssize_t) to avoid build errors.
To generate a diff of this commit:
cvs rdiff -u -r1.201 -r1.202 src/usr.bin/make/main.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/make/main.c
diff -u src/usr.bin/make/main.c:1.201 src/usr.bin/make/main.c:1.202
--- src/usr.bin/make/main.c:1.201 Thu Aug 30 21:17:05 2012
+++ src/usr.bin/make/main.c Fri Aug 31 02:59:37 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.201 2012/08/30 21:17:05 sjg Exp $ */
+/* $NetBSD: main.c,v 1.202 2012/08/31 02:59:37 pgoyette Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.201 2012/08/30 21:17:05 sjg Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.202 2012/08/31 02:59:37 pgoyette Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: main.c,v 1.201 2012/08/30 21:17:05 sjg Exp $");
+__RCSID("$NetBSD: main.c,v 1.202 2012/08/31 02:59:37 pgoyette Exp $");
#endif
#endif /* not lint */
#endif
@@ -1235,7 +1235,7 @@ main(int argc, char **argv)
} else if (expandVars) {
char tmp[128];
- if (snprintf(tmp, sizeof(tmp), "${%s}", var) >= sizeof(tmp))
+ if (snprintf(tmp, sizeof(tmp), "${%s}", var) >= (ssize_t)(sizeof(tmp)))
Fatal("%s: variable name too big: %s",
progname, var);
value = p1 = Var_Subst(NULL, tmp, VAR_GLOBAL, 0);
@@ -2051,7 +2051,7 @@ getBoolean(const char *name, Boolean bf)
char tmp[64];
char *cp;
- if (snprintf(tmp, sizeof(tmp), "${%s:tl}", name) < sizeof(tmp)) {
+ if (snprintf(tmp, sizeof(tmp), "${%s:tl}", name) < (ssize_t)(sizeof(tmp))) {
cp = Var_Subst(NULL, tmp, VAR_GLOBAL, 0);
if (cp) {