From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Cc: Ard Biesheuvel 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: [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: , X-List-Received-Date: Mon, 05 Sep 2016 07:56:46 -0000 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(+) 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); -- 2.7.4