From owner-svn-src-all@FreeBSD.ORG Fri Jan 30 13:03:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DFA265C; Fri, 30 Jan 2015 13:03:37 +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 60B8D775; Fri, 30 Jan 2015 13:03:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0UD3b9p021786; Fri, 30 Jan 2015 13:03:37 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0UD3b9k021785; Fri, 30 Jan 2015 13:03:37 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201501301303.t0UD3b9k021785@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Fri, 30 Jan 2015 13:03:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277927 - head/lib/libnv 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-1 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, 30 Jan 2015 13:03:37 -0000 Author: pjd Date: Fri Jan 30 13:03:36 2015 New Revision: 277927 URL: https://svnweb.freebsd.org/changeset/base/277927 Log: Make gcc happy. Reported by: bz Modified: head/lib/libnv/nvlist.c Modified: head/lib/libnv/nvlist.c ============================================================================== --- head/lib/libnv/nvlist.c Fri Jan 30 12:57:35 2015 (r277926) +++ head/lib/libnv/nvlist.c Fri Jan 30 13:03:36 2015 (r277927) @@ -358,6 +358,7 @@ nvlist_dump(const nvlist_t *nvl, int fd) { const nvlist_t *tmpnvl; nvpair_t *nvp, *tmpnvp; + void *cookie; int level; level = 0; @@ -419,9 +420,11 @@ nvlist_dump(const nvlist_t *nvl, int fd) } while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) { - nvl = nvlist_get_parent(nvl, (void **)&nvp); + cookie = NULL; + nvl = nvlist_get_parent(nvl, &cookie); if (nvl == NULL) return; + nvp = cookie; level--; } } @@ -443,6 +446,7 @@ nvlist_size(const nvlist_t *nvl) { const nvlist_t *tmpnvl; const nvpair_t *nvp, *tmpnvp; + void *cookie; size_t size; NVLIST_ASSERT(nvl); @@ -469,9 +473,11 @@ nvlist_size(const nvlist_t *nvl) } while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) { - nvl = nvlist_get_parent(nvl, (void **)&nvp); + cookie = NULL; + nvl = nvlist_get_parent(nvl, &cookie); if (nvl == NULL) goto out; + nvp = cookie; } } @@ -587,6 +593,7 @@ nvlist_xpack(const nvlist_t *nvl, int64_ size_t left, size; const nvlist_t *tmpnvl; nvpair_t *nvp, *tmpnvp; + void *cookie; NVLIST_ASSERT(nvl); @@ -655,9 +662,11 @@ nvlist_xpack(const nvlist_t *nvl, int64_ return (NULL); } while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) { - nvl = nvlist_get_parent(nvl, (void **)&nvp); + cookie = NULL; + nvl = nvlist_get_parent(nvl, &cookie); if (nvl == NULL) goto out; + nvp = cookie; ptr = nvpair_pack_nvlist_up(ptr, &left); if (ptr == NULL) goto out;