Received: from eggs.gnu.org ([2001:4830:134:3::10]:38717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxBwM-0005EV-Gt for qemu-devel@nongnu.org; Fri, 13 Nov 2015 05:50:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxBwJ-0003pr-9E for qemu-devel@nongnu.org; Fri, 13 Nov 2015 05:50:46 -0500 From: Alberto Garcia In-Reply-To: <20151113101552.GF6650@stefanha-x1.localdomain> References: <1447247832-14198-1-git-send-email-berto@igalia.com> <20151113101552.GF6650@stefanha-x1.localdomain> Date: Fri, 13 Nov 2015 11:50:03 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] block: make 'stats-intervals' a list of integers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , qemu-block@nongnu.org, Markus Armbruster , qemu-devel@nongnu.org, Max Reitz , Stefan Hajnoczi On Fri 13 Nov 2015 11:15:52 AM CET, Stefan Hajnoczi wr= ote: > blockdev.c: In function =E2=80=98blockdev_init=E2=80=99: > blockdev.c:636:17: error: =E2=80=98length=E2=80=99 may be used uninitiali= zed in this function [-Werror=3Dmaybe-uninitialized] > block_acct_add_interval(blk_get_stats(blk), length); > ^ > blockdev.c:597:22: note: =E2=80=98length=E2=80=99 was declared here > unsigned length; > ^ That's a false warning because length can only be uninitialized if 'error' is set. gcc 5.2.1 does not complain here... anyway, this should fix it: for (entry =3D qlist_first(interval_list); entry; entry =3D qlist_next(entry)) { - unsigned length; + unsigned length =3D 0; switch (qobject_type(entry->value)) { Do you want me to send a new patch, or do you prefer to apply this change in your branch? Thanks! Berto