From patchwork Mon Sep 5 07:56:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 75355 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp357453qgf; Mon, 5 Sep 2016 00:56:48 -0700 (PDT) X-Received: by 10.66.138.74 with SMTP id qo10mr60698253pab.135.1473062208870; Mon, 05 Sep 2016 00:56:48 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id gm2si28036074pac.159.2016.09.05.00.56.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Sep 2016 00:56:48 -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 2505D1A1E1B; Mon, 5 Sep 2016 00:56:48 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (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 7B5281A1DF7 for ; Mon, 5 Sep 2016 00:56:46 -0700 (PDT) Received: by mail-wm0-x22d.google.com with SMTP id b187so6861437wme.1 for ; Mon, 05 Sep 2016 00:56:46 -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=C4CqgwNfwQZrQa24fUeL1BfiR1DptuYdw3OQyuviUBw=; b=FaPEOhjQylHNbHUZOOtrsyTzyhkxSqP4B/W5opICVprsx7hZRjCgnyDiH02jO1N1ls luVvLGC1M39u6F6g3rUsg47UVR5rnWm8yS2RPX9z0sd8ef8DwBncPmy7tYZ4O6OBXQ5T UihaqMKDLiIlF8Ab4Aqqhjzt64FiaMORqVrDE= 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=C4CqgwNfwQZrQa24fUeL1BfiR1DptuYdw3OQyuviUBw=; b=eVD0x+6RXK32kqhnpbEo+u40YWjnZWWTvwIKlSiSUrxvR7vcEJu9XYxWM3rM2Vgyum Smgi7pAq4CWzFWvaon4g6bx13W7t09gaFBzzT1UYmyY65R44nQGhee/tPUDlCoKxjjig DjclNgVd5qqachUMxUgANEwguQ5inbxacJ6TKBiCzdZyYe8zITU1Hw6ShPeQBHE63r1k hLw/CVQJfEUdknwUsX/jocfLnLZWP/CMd8CRbyT/h4L5C7EsEXPge0B/bTijueFYFbxE FMcjYVHTf3XrP4hVBawDxJ3ITG/jjXbYqiMbTlaMwCKMIA1vvVGbpr9qb8ByNcmkyfEs XFOQ== X-Gm-Message-State: AE9vXwP6p697fKwEJmLyEIsLZwGr0+zUnt/FjSoWQuok5KOaoDbmDTzO/oHler3lMPHWDTdP X-Received: by 10.194.0.73 with SMTP id 9mr3569146wjc.123.1473062204440; Mon, 05 Sep 2016 00:56:44 -0700 (PDT) Received: from localhost.localdomain ([197.130.133.164]) by smtp.gmail.com with ESMTPSA id pm1sm26107526wjb.40.2016.09.05.00.56.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Sep 2016 00:56:43 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Mon, 5 Sep 2016 08:56:15 +0100 Message-Id: <1473062175-1567-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [edk2] [PATCH] ArmVirtPkg/FdtPciPcdProducerLib: zero init local var to please GCC 4.8 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" GCC 4.8 in RELEASE mode complains about GetPciIoTranslation () potentially not assigning IoTranslation, but does not notice that it returns failure in this case, which means IoTranslation is never referenced *unless* it has been assigned. So simply set IoTranslation to zero to help the compiler. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.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/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c b/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c index 10b47560cb9c..ea27cda7b77c 100644 --- a/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c +++ b/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c @@ -128,6 +128,7 @@ FdtPciPcdProducerLibConstructor ( PcdSetBool (PcdPciDisableBusEnumeration, FALSE); + IoTranslation = 0; RetStatus = GetPciIoTranslation (FdtClient, Node, &IoTranslation); if (!RETURN_ERROR (RetStatus)) { PcdSet64 (PcdPciIoTranslation, IoTranslation);