From owner-svn-src-head@freebsd.org Thu Dec 21 23:08:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13CEFE91C7C; Thu, 21 Dec 2017 23:08:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D20DB7D06D; Thu, 21 Dec 2017 23:08:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBLN8AWe091537; Thu, 21 Dec 2017 23:08:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBLN8AWr091536; Thu, 21 Dec 2017 23:08:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201712212308.vBLN8AWr091536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 21 Dec 2017 23:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327073 - head/sys/fs/nfsclient X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/fs/nfsclient X-SVN-Commit-Revision: 327073 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Dec 2017 23:08:12 -0000 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;