From patchwork Tue Mar 8 02:23:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Goldstein X-Patchwork-Id: 8528671 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 87470C0553 for ; Tue, 8 Mar 2016 02:26:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BE36E20155 for ; Tue, 8 Mar 2016 02:26:57 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AB33E201C8 for ; Tue, 8 Mar 2016 02:26:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1ad7JW-0006gm-EF; Tue, 08 Mar 2016 02:23:58 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1ad7JU-0006ga-OD for xen-devel@lists.xen.org; Tue, 08 Mar 2016 02:23:56 +0000 Received: from [85.158.139.211] by server-16.bemta-5.messagelabs.com id 48/7B-20762-BB73ED65; Tue, 08 Mar 2016 02:23:55 +0000 X-Env-Sender: cardoe@cardoe.com X-Msg-Ref: server-6.tower-206.messagelabs.com!1457403834!27173773!1 X-Originating-IP: [209.85.161.193] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 51516 invoked from network); 8 Mar 2016 02:23:55 -0000 Received: from mail-yw0-f193.google.com (HELO mail-yw0-f193.google.com) (209.85.161.193) by server-6.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 8 Mar 2016 02:23:55 -0000 Received: by mail-yw0-f193.google.com with SMTP id f6so116551ywa.1 for ; Mon, 07 Mar 2016 18:23:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cardoe.com; s=google; h=from:to:cc:subject:date:message-id; bh=GXYSREH4HGe1h0vhRR+tC5jhBUG3BxnjjNQL4/QFmRc=; b=HArQ5p7b/nZmLdONqJpUEE8e8CcUc8ppAhvsb5B+2ammC4gGAaRL7w9/W2n4Vri1Ec gW82+vq1I4gsl60p77/N7RxthVLvedJOiGTDmHsqj6SmIx5SBevORDFspjOmEm8Eeyo/ ++cIj6AOERZgEIqIE3hLJF3MZM3DKz/jN8qnY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GXYSREH4HGe1h0vhRR+tC5jhBUG3BxnjjNQL4/QFmRc=; b=c/ohq37mQPL6HlVEWCFC7lT0E3dIhYOAsMAWAkz9q2rEreSkj0VbZVkv6zaLKfarnI aVD0dz5ACUVMmD54T/RdzVMEJ5uWGmQVk7npPUaHhw92F13RnJbie4EewbN2W9sn6e7A 6/ctSvZb0zvvjlXL383xSnDMpxbegttShcbj28rBLFbE+gmvBfkzy+sPyO1khwbrI9Rt KdvasZWq7e5O9YhYzgQfuf88XMhdzJnKvnKaCp27yl1LkM7MeV/djAyMRR2UJDInPLSK oUIFV2enUCS2d4OgWt9dZ0PGQ2bm7YTbWvYEEuVW2iH98No+uMmUULNf9V6bgcYIAgph X5aQ== X-Gm-Message-State: AD7BkJJIp5z26x0OpS/Hzk3f89dlJqEA1gmFq8OpQUT3XM7hlfpZytq9g9Q0ixJJp+4xKg== X-Received: by 10.129.110.197 with SMTP id j188mr13874879ywc.293.1457403833976; Mon, 07 Mar 2016 18:23:53 -0800 (PST) Received: from swanson.lan (c-68-46-196-185.hsd1.al.comcast.net. [68.46.196.185]) by smtp.gmail.com with ESMTPSA id x129sm429092ywd.19.2016.03.07.18.23.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Mar 2016 18:23:52 -0800 (PST) From: Doug Goldstein To: xen-devel@lists.xen.org Date: Mon, 7 Mar 2016 20:23:39 -0600 Message-Id: <1457403820-2949-1-git-send-email-cardoe@cardoe.com> X-Mailer: git-send-email 2.4.10 Cc: Ian Jackson , Doug Goldstein , Wei Liu , Stefano Stabellini Subject: [Xen-devel] [PATCH 1/2] libxl: ensure var is inited in libxl__domain_firmware X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some versions of GCC complain that the 'firmware' variable can be used uninitialized. It looks like the switch inside of the else case is just confusing GCC. Signed-off-by: Doug Goldstein Acked-by: Wei Liu --- CC: Ian Jackson CC: Stefano Stabellini CC: Wei Liu --- tools/libxl/libxl_dom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index 664adad..b825b98 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -867,7 +867,7 @@ static int libxl__domain_firmware(libxl__gc *gc, struct xc_dom_image *dom) { libxl_ctx *ctx = libxl__gc_owner(gc); - const char *firmware; + const char *firmware = NULL; int e, rc; int datalen = 0; void *data;