Received: from eggs.gnu.org ([2001:4830:134:3::10]:49378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1HGk-0004uu-0I for qemu-devel@nongnu.org; Mon, 31 Oct 2016 14:25:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1HGf-0000pY-VD for qemu-devel@nongnu.org; Mon, 31 Oct 2016 14:25:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41004) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c1HGf-0000or-Pa for qemu-devel@nongnu.org; Mon, 31 Oct 2016 14:25:09 -0400 Date: Mon, 31 Oct 2016 16:25:07 -0200 From: Eduardo Habkost Message-ID: <20161031182507.GB25480@thinpad.lan.raisama.net> References: <1477824430-1460-1-git-send-email-amit.shah@redhat.com> <1477824430-1460-7-git-send-email-amit.shah@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1477824430-1460-7-git-send-email-amit.shah@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PULL 06/18] COLO: Introduce checkpointing protocol List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: Peter Maydell , qemu list , zhang.zhanghailiang@huawei.com, "Dr. David Alan Gilbert" , Juan Quintela On Sun, Oct 30, 2016 at 04:16:58PM +0530, Amit Shah wrote: [...] > +static void colo_wait_handle_message(QEMUFile *f, int *checkpoint_requ= est, > + Error **errp) > +{ > + COLOMessage msg; > + Error *local_err =3D NULL; > + > + msg =3D colo_receive_message(f, &local_err); > + if (local_err) { > + error_propagate(errp, local_err); > + return; > + } > + > + switch (msg) { > + case COLO_MESSAGE_CHECKPOINT_REQUEST: > + *checkpoint_request =3D 1; > + break; > + default: > + *checkpoint_request =3D 0; > + error_setg(errp, "Got unknown COLO message: %d", msg); > + break; > + } > +} [...] > + colo_wait_handle_message(mis->from_src_file, &request, &local_= err); > + if (local_err) { > + goto out; > + } > + assert(request); GCC 4.8.5 doesn't seem to be smart enough to notice that request will be always initialized: /root/qemu/migration/colo.c: In function =E2=80=98colo_process_incoming= _thread=E2=80=99: /root/qemu/migration/colo.c:448:33: error: =E2=80=98request=E2=80=99 ma= y be used uninitialized in this function [-Werror=3Dmaybe-uninitialized] assert(request); ^ cc1: all warnings being treated as errors $ gcc --version gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4) --=20 Eduardo