From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb0-x22a.google.com (mail-yb0-x22a.google.com [IPv6:2607:f8b0:4002:c09::22a]) (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 E3F911A1E3A for ; Mon, 24 Oct 2016 00:58:59 -0700 (PDT) Received: by mail-yb0-x22a.google.com with SMTP id f97so64042653ybi.1 for ; Mon, 24 Oct 2016 00:58:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HChoJk8wL/P3H/qQMh7ZBwS4mBAUWya2jW6yxfBjBwY=; b=Sxzu/yaPjyFj4dV2RsNSSWQrcuUoR/9Huc+m/kPCuexlp6+Qf7/nm18AQrhA3OP2xZ DEzWolUDkiN4YAidwe9dH+ZHU5EoMP69Vgon96852zmCUjMA+wzTQolLGr6rKqWiuFn1 p1TqK83DXUiXo1jeHSPPnv2GsGAyYSO09/LSo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HChoJk8wL/P3H/qQMh7ZBwS4mBAUWya2jW6yxfBjBwY=; b=Yi4LPCkkFeP6MB8bIHJAQNvGCsZKHxBVmXLGu5snCGvUbdx13pKKQwQwgbH+w03wHV UrZvb/2n6x0oK183mgxXOr4xzoFqsUypdvhTKLqDrW7rA1XCaDopydGJ5f7Y51GE5rU0 c5UV5eknCEZhsXaUrLTe91gZ5VySHgBMtrIFI2MXntLqY2dZgYLz6qFBCth1Spj8qgY2 ZN98PZvOcpP2sY1B/T2DYYfy7tVHGgXd/tX/+O/5oW5VbuRCKGxLfHxC9rfj4Uytc2m6 KOmsUQvMA9hQQs1qiUdoaC+WNAWSjgX4RZUSwxmhaf9pNn56ieVcQUik/Ie03ktsl/lg hJXw== X-Gm-Message-State: ABUngvcgUmn6SOcOzc6KUT3w+Ow9belBqGMtVSE6bnNmp4uszS7Ubl8N0d1bnfgSrcK4RoNcbEBqSLrW+V+OLy3b X-Received: by 10.36.19.212 with SMTP id 203mr1181644itz.59.1477295939127; Mon, 24 Oct 2016 00:58:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.5.139 with HTTP; Mon, 24 Oct 2016 00:58:58 -0700 (PDT) In-Reply-To: <20161021212737.15974-17-lersek@redhat.com> References: <20161021212737.15974-1-lersek@redhat.com> <20161021212737.15974-17-lersek@redhat.com> From: Ard Biesheuvel Date: Mon, 24 Oct 2016 08:58:58 +0100 Message-ID: To: Laszlo Ersek Cc: edk2-devel-01 Subject: Re: [PATCH 16/19] ArmVirtPkg/PlatformBootManagerLib: eliminate unchecked PcdSetXX() calls 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, 24 Oct 2016 07:59:00 -0000 Content-Type: text/plain; charset=UTF-8 On 21 October 2016 at 22:27, Laszlo Ersek wrote: > These are deprecated / disabled under the > DISABLE_NEW_DEPRECATED_INTERFACES feature test macro. > > Introduce a variable called PcdStatus, and use it to assert the success of > these operations (there is no reason for them to fail here). > > Cc: Ard Biesheuvel > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=165 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel > --- > ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c > index aecad570a04f..56f4c921b513 100644 > --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c > +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c > @@ -578,6 +578,8 @@ PlatformBootManagerBeforeConsole ( > VOID > ) > { > + RETURN_STATUS PcdStatus; > + > // > // Signal EndOfDxe PI Event > // > @@ -629,7 +631,9 @@ PlatformBootManagerBeforeConsole ( > // > // Set the front page timeout from the QEMU configuration. > // > - PcdSet16 (PcdPlatformBootTimeOut, GetFrontPageTimeoutFromQemu ()); > + PcdStatus = PcdSet16S (PcdPlatformBootTimeOut, > + GetFrontPageTimeoutFromQemu ()); > + ASSERT_RETURN_ERROR (PcdStatus); > > // > // Register platform-specific boot options and keyboard shortcuts. > -- > 2.9.2 > >