Date: Thu, 21 Dec 2017 23:08:10 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327073 - head/sys/fs/nfsclient Message-ID: <201712212308.vBLN8AWr091536@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Thu Dec 21 23:08:10 2017 New Revision: 327073 URL: https://svnweb.freebsd.org/changeset/base/327073 Log: Fix build for LP64 arches with gcc. gcc complaints that the comparision is always false due to the value range, and the cast does not prevent the analysis. Split the LP64 vs. ILP32 clamping as a workaround. Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Thu Dec 21 23:05:13 2017 (r327072) +++ head/sys/fs/nfsclient/nfs_clvnops.c Thu Dec 21 23:08:10 2017 (r327073) @@ -3461,7 +3461,11 @@ nfs_pathconf(struct vop_pathconf_args *ap) } switch (ap->a_name) { case _PC_LINK_MAX: +#ifdef _LP64 + *ap->a_retval = pc.pc_linkmax; +#else *ap->a_retval = MIN(LONG_MAX, pc.pc_linkmax); +#endif break; case _PC_NAME_MAX: *ap->a_retval = pc.pc_namemax;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712212308.vBLN8AWr091536>