From patchwork Wed Jul 13 14:55:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 71930 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1046557qga; Wed, 13 Jul 2016 07:55:42 -0700 (PDT) X-Received: by 10.98.101.198 with SMTP id z189mr4065498pfb.53.1468421735038; Wed, 13 Jul 2016 07:55:35 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id ap9si4390197pad.30.2016.07.13.07.55.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jul 2016 07:55:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E1CB11A1F1B; Wed, 13 Jul 2016 07:56:19 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 15B7E1A1E5F for ; Wed, 13 Jul 2016 07:56:19 -0700 (PDT) Received: by mail-wm0-x233.google.com with SMTP id f65so32463101wmi.0 for ; Wed, 13 Jul 2016 07:55:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=/sKe6kgj1ynlBoIiuAZUiZxkk5sli5x39+nszAFPH1I=; b=Qw21qK5C0qTPZKM1Ovjo1a1sgoh3HhH+3tOdTAl5trHHnATYn3UxDWUO1nY8uFqOdR OMtK5QNIPcQBG8Kpx68QwZqNGhkoWvlN9XZaKrbFeLxaSqBuPODxJRQDAoAwp1EeSH5X oEo3LXaSj+rWTWe96C2m8kGTXqdGxK2/apmgo= 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=/sKe6kgj1ynlBoIiuAZUiZxkk5sli5x39+nszAFPH1I=; b=XO8ns73UFO8xhUby67cAU6PO6T1/6qI7QRudcdCByATshutGnhj0nIrvYyRkF1YAAo ler4igmo1bgoJ/o3BLZyG/flIuK2CS3XsQnYCllHek+udhao+q7qPl62AqpgWHF/xIME R/VKLQrknjJD9eqOEShmFY5tofqDN7+7jpX/LNXX0UKaW1I33HE6bq554oWp1R8tNG0F 8Gnd8k9340O0luyLJwj6WF6nmio+J4ahkVwZDE4Cnfdl/tb1EI9xBUPEgMdntYx12Gef IIIH9V4QNttZi7HIsAKCJ94H+6O5DojvrfEzbpQHzOl8BCNpVXw1+mD7rtoUItZm6tw3 2h3Q== X-Gm-Message-State: ALyK8tIdmH3dVGZEBDblmjouv/fz9UbRH8c2aRI0cofpwsDnLcVrpIVkvcH1zMR/oMLl3Qh7 X-Received: by 10.28.56.68 with SMTP id f65mr28611810wma.58.1468421731495; Wed, 13 Jul 2016 07:55:31 -0700 (PDT) Received: from localhost.localdomain ([188.203.148.129]) by smtp.gmail.com with ESMTPSA id 66sm37756561wmg.23.2016.07.13.07.55.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Jul 2016 07:55:30 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com, Jordan Justen Date: Wed, 13 Jul 2016 16:55:27 +0200 Message-Id: <1468421727-7025-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [edk2] [PATCH] OvmfPkg/PlatformPei: add missing auto variable initialization X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" The E820EntriesCount variable in XenPublishRamRegions() may be referenced without being initialized on RELEASE builds, since the ASSERT that fires if the call to XenGetE820Map() fails is compiled out in that case. So initialize it to 0. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- Just something that was caught by GCC when building OVMF with O2 optimization. OvmfPkg/PlatformPei/Xen.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Laszlo Ersek diff --git a/OvmfPkg/PlatformPei/Xen.c b/OvmfPkg/PlatformPei/Xen.c index 3a4358251e38..223908a4f529 100644 --- a/OvmfPkg/PlatformPei/Xen.c +++ b/OvmfPkg/PlatformPei/Xen.c @@ -171,6 +171,7 @@ XenPublishRamRegions ( // // Parse RAM in E820 map // + E820EntriesCount = 0; Status = XenGetE820Map (&E820Map, &E820EntriesCount); ASSERT_EFI_ERROR (Status);