Date: Fri, 29 Apr 2011 08:26:53 -0400 (EDT) From: Rick Macklem <rmacklem@uoguelph.ca> To: "O. Hartmann" <ohartman@zedat.fu-berlin.de> Cc: FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: CURRENT/amd64: kernel compil error: /usr/src/sys/fs/nfsclient/nfs_clvfsops.c: In function 'nfs_mount':, /usr/src/sys/fs/nfsclient/nfs_clvfsops.c:1030: warning: passing argument 4 of 'copyinstr' from incompatible pointer type Message-ID: <257816720.755191.1304080013911.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <4DBA8CA7.3060807@zedat.fu-berlin.de>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
> Since this morning after updating the sources I get the following
> error
> while compiling a new kernel:
>
> cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -march=native
> -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
> -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef
> -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys
> -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS
> -include opt_global.h -fno-common -finline-limit=8000 --param
> inline-unit-growth=100 --param large-function-growth=1000
> -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387
> -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
> -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector
> -Werror
> /usr/src/sys/fs/nfsclient/nfs_clvfsops.c
> cc1: warnings being treated as errors
> /usr/src/sys/fs/nfsclient/nfs_clvfsops.c: In function 'nfs_mount':
> /usr/src/sys/fs/nfsclient/nfs_clvfsops.c:1030: warning: passing
> argument
> 4 of 'copyinstr' from incompatible pointer type
> *** Error code 1
>
Oops, sorry. r221190 doesn't build for 64bits arches like amd64. I
cribbed the code from the regular client, but didn't notice "len"
was declared size_t and not int. The patch is attached and will be
committed to head in a few minutes.
Thanks for reporting it, rick
[-- Attachment #2 --]
--- fs/nfsclient/nfs_clvfsops.c.sav 2011-04-29 08:12:42.000000000 -0400
+++ fs/nfsclient/nfs_clvfsops.c 2011-04-29 08:13:35.000000000 -0400
@@ -763,6 +763,7 @@ nfs_mount(struct mount *mp)
char *opt, *name, *secname;
int negnametimeo = NFS_DEFAULT_NEGNAMETIMEO;
int dirlen, has_nfs_args_opt, krbnamelen, srvkrbnamelen;
+ size_t hstlen;
has_nfs_args_opt = 0;
if (vfs_filteropt(mp->mnt_optnew, nfs_opts)) {
@@ -1027,10 +1028,10 @@ nfs_mount(struct mount *mp)
args.fhsize);
if (error != 0)
goto out;
- error = copyinstr(args.hostname, hst, MNAMELEN - 1, &len);
+ error = copyinstr(args.hostname, hst, MNAMELEN - 1, &hstlen);
if (error != 0)
goto out;
- bzero(&hst[len], MNAMELEN - len);
+ bzero(&hst[hstlen], MNAMELEN - hstlen);
args.hostname = hst;
/* sockargs() call must be after above copyin() calls */
error = getsockaddr(&nam, (caddr_t)args.addr,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?257816720.755191.1304080013911.JavaMail.root>
