Revision: 19069
          http://sourceforge.net/p/edk2/code/19069
Author:   lersek
Date:     2015-11-30 21:11:29 +0000 (Mon, 30 Nov 2015)
Log Message:
-----------
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 <[email protected]>
Cc: Prince Agyeman <[email protected]>
Cc: Laszlo Ersek <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Suggested-by: Laszlo Ersek <[email protected]>
Signed-off-by: Star Zeng <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Reviewed-by: Maurice Ma <[email protected]>

Modified Paths:
--------------
    trunk/edk2/CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c

Modified: 
trunk/edk2/CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
===================================================================
--- trunk/edk2/CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c     
2015-11-30 19:57:45 UTC (rev 19068)
+++ trunk/edk2/CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c     
2015-11-30 21:11:29 UTC (rev 19069)
@@ -45,11 +45,17 @@
   }
 
   if (SerialRegAccessType == 2) { //MMIO
-    PcdSetBoolS (PcdSerialUseMmio, TRUE);
+    Status = PcdSetBoolS (PcdSerialUseMmio, TRUE);
   } else { //IO
-    PcdSetBoolS (PcdSerialUseMmio, FALSE);
+    Status = PcdSetBoolS (PcdSerialUseMmio, FALSE);
   }
-  PcdSet64S (PcdSerialRegisterBase, (UINT64) SerialRegBase);
+  if (RETURN_ERROR (Status)) {
+    return Status;
+  }
+  Status = PcdSet64S (PcdSerialRegisterBase, (UINT64) SerialRegBase);
+  if (RETURN_ERROR (Status)) {
+    return Status;
+  }
 
   return RETURN_SUCCESS;
 }


------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to