diff options
author | Star Zeng <star.zeng@intel.com> | 2015-11-30 21:11:29 +0000 |
---|---|---|
committer | lersek <lersek@Edk2> | 2015-11-30 21:11:29 +0000 |
commit | 53f97bdc4433532ba824b1db98228c7037fd978a (patch) | |
tree | ffd10035e19325631b4797cf4df001a4903ceb96 /CorebootPayloadPkg/Library | |
parent | 53ba3fb8aaf91df4a65244480deb6fa60968c146 (diff) | |
download | edk2-platforms-53f97bdc4433532ba824b1db98228c7037fd978a.tar.xz |
CorebootPayloadPkg PlatformHookLib: Fix GCC build failure
Add return status check to fix GCC build failure below.
error: right-hand operand of comma expression has no effect
[-Werror=unused-value]
((_gPcd_BinaryPatch_PcdSerialUseMmio = (Value)), RETURN_SUCCESS)
error: right-hand operand of comma expression has no effect
[-Werror=unused-value]
((_gPcd_BinaryPatch_PcdSerialRegisterBase = (Value)), RETURN_SUCCESS)
http://article.gmane.org/gmane.comp.bios.edk2.devel/4949
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Suggested-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Maurice Ma <maurice.ma@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19069 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'CorebootPayloadPkg/Library')
-rw-r--r-- | CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c b/CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c index 10fd332fe5..8449997050 100644 --- a/CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c +++ b/CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c @@ -45,11 +45,17 @@ PlatformHookSerialPortInitialize ( }
if (SerialRegAccessType == 2) { //MMIO
- PcdSetBoolS (PcdSerialUseMmio, TRUE);
+ Status = PcdSetBoolS (PcdSerialUseMmio, TRUE);
} else { //IO
- PcdSetBoolS (PcdSerialUseMmio, FALSE);
+ Status = PcdSetBoolS (PcdSerialUseMmio, FALSE);
+ }
+ if (RETURN_ERROR (Status)) {
+ return Status;
+ }
+ Status = PcdSet64S (PcdSerialRegisterBase, (UINT64) SerialRegBase);
+ if (RETURN_ERROR (Status)) {
+ return Status;
}
- PcdSet64S (PcdSerialRegisterBase, (UINT64) SerialRegBase);
return RETURN_SUCCESS;
}
|