From owner-svn-src-all@freebsd.org Fri Jan 20 13:21:29 2017 Return-Path: Delivered-To: svn-src-all@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 0516ACB7ECB; Fri, 20 Jan 2017 13:21:29 +0000 (UTC) (envelope-from avg@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 C70EB1CE8; Fri, 20 Jan 2017 13:21:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0KDLRGr040416; Fri, 20 Jan 2017 13:21:27 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0KDLRRu040415; Fri, 20 Jan 2017 13:21:27 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201701201321.v0KDLRRu040415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 20 Jan 2017 13:21:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312531 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2017 13:21:29 -0000 Author: avg Date: Fri Jan 20 13:21:27 2017 New Revision: 312531 URL: https://svnweb.freebsd.org/changeset/base/312531 Log: vmm_dev: work around a bogus error with gcc 6.3.0 The error is: vmm_dev.c: In function 'alloc_memseg': vmm_dev.c:261:11: error: null argument where non-null required (argument 1) [-Werror=nonnull] Apparently, the gcc is unable to figure out that if a ternary operator produced a non-NULL value once, then the operator with exactly the same operands would produce the same value again. MFC after: 1 week Modified: head/sys/amd64/vmm/vmm_dev.c Modified: head/sys/amd64/vmm/vmm_dev.c ============================================================================== --- head/sys/amd64/vmm/vmm_dev.c Fri Jan 20 13:01:25 2017 (r312530) +++ head/sys/amd64/vmm/vmm_dev.c Fri Jan 20 13:21:27 2017 (r312531) @@ -258,7 +258,7 @@ alloc_memseg(struct vmmdev_softc *sc, st if (VM_MEMSEG_NAME(mseg)) { sysmem = false; name = malloc(SPECNAMELEN + 1, M_VMMDEV, M_WAITOK); - error = copystr(VM_MEMSEG_NAME(mseg), name, SPECNAMELEN + 1, 0); + error = copystr(mseg->name, name, SPECNAMELEN + 1, 0); if (error) goto done; }