From owner-svn-src-all@FreeBSD.ORG Sat Aug 2 17:58:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C501BF36; Sat, 2 Aug 2014 17:58:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 B2E582BA8; Sat, 2 Aug 2014 17:58:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s72HwKEL091658; Sat, 2 Aug 2014 17:58:20 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s72HwKQ8091657; Sat, 2 Aug 2014 17:58:20 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201408021758.s72HwKQ8091657@svn.freebsd.org> From: Alan Cox Date: Sat, 2 Aug 2014 17:58:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269438 - head/sys/vm 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.18 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: Sat, 02 Aug 2014 17:58:20 -0000 Author: alc Date: Sat Aug 2 17:58:20 2014 New Revision: 269438 URL: http://svnweb.freebsd.org/changeset/base/269438 Log: Rewrite a loop in vm_map_wire() so that gcc doesn't think that the variable "rv" is uninitialized. Reported by: bz Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat Aug 2 17:45:08 2014 (r269437) +++ head/sys/vm/vm_map.c Sat Aug 2 17:58:20 2014 (r269438) @@ -2569,8 +2569,8 @@ vm_map_wire(vm_map_t map, vm_offset_t st vm_map_busy(map); vm_map_unlock(map); - for (faddr = saved_start; faddr < saved_end; faddr += - PAGE_SIZE) { + faddr = saved_start; + do { /* * Simulate a fault to get the page and enter * it into the physical map. @@ -2578,7 +2578,7 @@ vm_map_wire(vm_map_t map, vm_offset_t st if ((rv = vm_fault(map, faddr, VM_PROT_NONE, VM_FAULT_CHANGE_WIRING)) != KERN_SUCCESS) break; - } + } while ((faddr += PAGE_SIZE) < saved_end); vm_map_lock(map); vm_map_unbusy(map); if (last_timestamp + 1 != map->timestamp) {