From patchwork Mon Oct 31 21:50:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Cody X-Patchwork-Id: 689659 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3t77Ns0k5Tz9t15 for ; Tue, 1 Nov 2016 08:51:39 +1100 (AEDT) Received: from localhost ([::1]:38746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1KUS-0002Hi-Bi for incoming@patchwork.ozlabs.org; Mon, 31 Oct 2016 17:51:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1KTk-0001Yo-W9 for qemu-devel@nongnu.org; Mon, 31 Oct 2016 17:50:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1KTk-000657-5T for qemu-devel@nongnu.org; Mon, 31 Oct 2016 17:50:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34668) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c1KTf-00064Z-MA; Mon, 31 Oct 2016 17:50:47 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AF168485; Mon, 31 Oct 2016 21:50:46 +0000 (UTC) Received: from localhost (ovpn-112-28.phx2.redhat.com [10.3.112.28]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9VLojHU027156 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 31 Oct 2016 17:50:46 -0400 From: Jeff Cody To: qemu-devel@nongnu.org Date: Mon, 31 Oct 2016 17:50:44 -0400 Message-Id: <259818682e41b95ae60f1423b87954a3fe377639.1477950393.git.jcody@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 31 Oct 2016 21:50:46 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/1] migration: fix compiler warning on uninitialized variable X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.cave-ayland@ilande.co.uk, zhang.zhanghailiang@huawei.com, qemu-block@nongnu.org, quintela@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Some older GCC versions (e.g. 4.4.7) report a warning on an uninitialized variable for 'request', even though all possible code paths that reference 'request' will be initialized. To appease these versions, initialize the variable to 0. Reported-by: Mark Cave-Ayland Signed-off-by: Jeff Cody Reviewed-by: zhanghailiang --- migration/colo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/colo.c b/migration/colo.c index e7224b8..93c85c5 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -439,7 +439,7 @@ void *colo_process_incoming_thread(void *opaque) } while (mis->state == MIGRATION_STATUS_COLO) { - int request; + int request = 0; colo_wait_handle_message(mis->from_src_file, &request, &local_err); if (local_err) {