Date: Mon, 6 Jan 2003 10:45:36 -0500 From: Mike Barcroft <mike@FreeBSD.org> To: Robert Watson <rwatson@FreeBSD.org> Cc: current@freebsd.org Subject: Re: alpha tinderbox failure Message-ID: <20030106104536.C24442@espresso.q9media.com> In-Reply-To: <200301061201.h06C1VOx027972@beast.freebsd.org>; from des@FreeBSD.org on Mon, Jan 06, 2003 at 04:01:31AM -0800 References: <200301061201.h06C1VOx027972@beast.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smorgrav <des@FreeBSD.org> writes: > -------------------------------------------------------------- > >>> Kernel build for LINT started on Mon Jan 6 03:35:12 PST 2003 > -------------------------------------------------------------- > ===> vinum > "Makefile", line 4445: warning: duplicate script for target "geom_bsd.o" [...] > /h/des/src/sys/dev/lmc/if_lmc.c:32:2: warning: #warning "The lmc driver i [...] > /h/des/src/sys/dev/pdq/pdq.c: In function `pdq_initialize': > /h/des/src/sys/dev/pdq/pdq.c:1606: warning: cast discards qualifiers from [...] > /h/des/src/sys/pci/meteor.c:149:2: warning: #warning "The meteor driver i [...] > /h/des/src/sys/pci/simos.c:30:2: warning: #warning "The simos driver is b [...] > cc1: warnings being treated as errors > /h/des/src/sys/security/mac_lomac/mac_lomac.c: In function `mac_lomac_ass [...] > /h/des/src/sys/security/mac_lomac/mac_lomac.c:1070: warning: passing arg [...] > /h/des/src/sys/security/mac_lomac/mac_lomac.c:1081: warning: int format, [...] > *** Error code 1 These new truncated lines only make problems harder to solve. Anyway, the problem is the 5th argument to vn_extattr_get() should be an int *, but it's passing a size_t *. It looks like most consumers of vn_extattr_get() would prefer a size_t *, so maybe the interface should be changed. This patch should resolve the problem without changing vn_extattr_get()'s interface: %%% Index: mac_lomac.c =================================================================== RCS file: /work/repo/src/sys/security/mac_lomac/mac_lomac.c,v retrieving revision 1.6 diff -u -r1.6 mac_lomac.c --- mac_lomac.c 10 Dec 2002 16:20:33 -0000 1.6 +++ mac_lomac.c 6 Jan 2003 15:53:02 -0000 @@ -49,6 +49,7 @@ #include <sys/malloc.h> #include <sys/mount.h> #include <sys/proc.h> +#include <sys/stdint.h> #include <sys/systm.h> #include <sys/sysproto.h> #include <sys/sysent.h> @@ -1067,7 +1068,7 @@ bzero(&temp, buflen); error = vn_extattr_get(vp, IO_NODELOCKED, MAC_LOMAC_EXTATTR_NAMESPACE, - MAC_LOMAC_EXTATTR_NAME, &buflen, (char *)&temp, curthread); + MAC_LOMAC_EXTATTR_NAME, (int *)&buflen, (char *)&temp, curthread); if (error == ENOATTR || error == EOPNOTSUPP) { /* Fall back to the fslabel. */ mac_lomac_copy_single(source, dest); @@ -1077,8 +1078,9 @@ if (buflen != sizeof(temp)) { if (buflen != sizeof(temp) - sizeof(temp.ml_auxsingle)) { - printf("mac_lomac_associate_vnode_extattr: bad size %d\n", - buflen); + printf( + "mac_lomac_associate_vnode_extattr: bad size %ju\n", + (uintmax_t)buflen); return (EPERM); } bzero(&temp.ml_auxsingle, sizeof(temp.ml_auxsingle)); %%% Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030106104536.C24442>