Date: Mon, 15 Jul 2002 01:53:35 +0300 From: Giorgos Keramidas <keramida@FreeBSD.org> To: freebsd-audit@FreeBSD.org Subject: bin/ln & WARNS=5 Message-ID: <20020714225335.GA41543@hades.hell.gr>
next in thread | raw e-mail | index | archive | help
The following allows me to build bin/ln with WARNS=5 on i386.
Does it look OK, or have I missed something important?
%%%
Index: ln.c
===================================================================
RCS file: /home/ncvs/src/bin/ln/ln.c,v
retrieving revision 1.28
diff -u -r1.28 ln.c
--- ln.c 30 Jun 2002 05:13:54 -0000 1.28
+++ ln.c 14 Jul 2002 22:42:49 -0000
@@ -189,7 +189,7 @@
p = target;
else
++p;
- if (snprintf(path, sizeof(path), "%s/%s", source, p) >=
+ if ((size_t)snprintf(path, sizeof(path), "%s/%s", source, p) >=
sizeof(path)) {
errno = ENAMETOOLONG;
warn("%s", target);
%%%
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020714225335.GA41543>
