public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Tan, Ming" <ming.tan@intel.com>
To: devel@edk2.groups.io
Cc: Eric Dong <eric.dong@intel.com>, Liming Gao <liming.gao@intel.com>
Subject: [PATCH] Features/Intel/Debugging: Fix build error when use Xcode
Date: Mon, 22 Jun 2020 15:32:49 +0800	[thread overview]
Message-ID: <20200622073249.5329-1-ming.tan@intel.com> (raw)

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2822

When use Xcode, it will report following compile error:
  duplicate symbol _mRscHandlerProtocol in:

So in the Features/Intel/Debugging/,
change the global variable name in the following files
  RuntimeDxeBeepStatusCodeHandlerLib.c
  RuntimeDxePostCodeStatusCodeHandlerLib.c

Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Ming Tan <ming.tan@intel.com>
---
 .../RuntimeDxeBeepStatusCodeHandlerLib.c      | 20 +++++++++----------
 .../RuntimeDxePostCodeStatusCodeHandlerLib.c  | 20 +++++++++----------
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.c b/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.c
index 631e2eecae..0bdc3f4575 100644
--- a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.c
+++ b/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.c
@@ -17,9 +17,9 @@
 #include <Library/BeepMapLib.h>
 #include <Library/BeepLib.h>
 
-EFI_RSC_HANDLER_PROTOCOL  *mRscHandlerProtocol       = NULL;
-EFI_EVENT                 mExitBootServicesEvent     = NULL;
-BOOLEAN                   mRegistered                = FALSE;
+EFI_RSC_HANDLER_PROTOCOL  *mBeepRscHandlerProtocol       = NULL;
+EFI_EVENT                 mBeepExitBootServicesEvent     = NULL;
+BOOLEAN                   mBeepRegistered                = FALSE;
 
 /**
   Convert status code value to the times of beep.
@@ -79,8 +79,8 @@ UnregisterBeepBootTimeHandlers (
   IN VOID             *Context
   )
 {
-  if (mRegistered) {
-    mRscHandlerProtocol->Unregister (BeepStatusCodeReportWorker);
+  if (mBeepRegistered) {
+    mBeepRscHandlerProtocol->Unregister (BeepStatusCodeReportWorker);
   }
 }
 
@@ -105,13 +105,13 @@ RegisterBeepBootTimeHandlers (
   Status = gBS->LocateProtocol (
                   &gEfiRscHandlerProtocolGuid,
                   NULL,
-                  (VOID **) &mRscHandlerProtocol
+                  (VOID **) &mBeepRscHandlerProtocol
                   );
   ASSERT_EFI_ERROR (Status);
 
-  mRscHandlerProtocol->Register (BeepStatusCodeReportWorker, TPL_HIGH_LEVEL);
+  mBeepRscHandlerProtocol->Register (BeepStatusCodeReportWorker, TPL_HIGH_LEVEL);
   ASSERT_EFI_ERROR (Status);
-  mRegistered = TRUE;
+  mBeepRegistered = TRUE;
 
   Status = gBS->CreateEventEx (
                   EVT_NOTIFY_SIGNAL,
@@ -119,7 +119,7 @@ RegisterBeepBootTimeHandlers (
                   UnregisterBeepBootTimeHandlers,
                   NULL,
                   &gEfiEventExitBootServicesGuid,
-                  &mExitBootServicesEvent
+                  &mBeepExitBootServicesEvent
                   );
   ASSERT_EFI_ERROR (Status);
 }
@@ -154,7 +154,7 @@ RuntimeDxeBeepStatusCodeHandlerLibConstructor (
   Status = gBS->LocateProtocol (
                   &gEfiRscHandlerProtocolGuid,
                   NULL,
-                  (VOID **) &mRscHandlerProtocol
+                  (VOID **) &mBeepRscHandlerProtocol
                   );
 
   if (!EFI_ERROR (Status)) {
diff --git a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.c b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.c
index 59b531fe7c..65fd555cc0 100644
--- a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.c
+++ b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.c
@@ -18,9 +18,9 @@
 #include <Library/PostCodeMapLib.h>
 #include <Library/PostCodeLib.h>
 
-EFI_RSC_HANDLER_PROTOCOL  *mRscHandlerProtocol       = NULL;
-EFI_EVENT                 mExitBootServicesEvent     = NULL;
-BOOLEAN                   mRegisted                  = FALSE;
+EFI_RSC_HANDLER_PROTOCOL  *mPostCodeRscHandlerProtocol       = NULL;
+EFI_EVENT                 mPostCodeExitBootServicesEvent     = NULL;
+BOOLEAN                   mPostCodeRegisted                  = FALSE;
 
 /**
   Convert status code value and write data to post code.
@@ -81,8 +81,8 @@ UnregisterPostCodeBootTimeHandlers (
   IN VOID             *Context
   )
 {
-  if (mRegisted) {
-    mRscHandlerProtocol->Unregister (PostCodeStatusCodeReportWorker);
+  if (mPostCodeRegisted) {
+    mPostCodeRscHandlerProtocol->Unregister (PostCodeStatusCodeReportWorker);
   }
 }
 
@@ -109,13 +109,13 @@ RegisterPostCodeBootTimeHandlers (
   Status = gBS->LocateProtocol (
                   &gEfiRscHandlerProtocolGuid,
                   NULL,
-                  (VOID **) &mRscHandlerProtocol
+                  (VOID **) &mPostCodeRscHandlerProtocol
                   );
   ASSERT_EFI_ERROR (Status);
 
-  mRscHandlerProtocol->Register (PostCodeStatusCodeReportWorker, TPL_HIGH_LEVEL);
+  mPostCodeRscHandlerProtocol->Register (PostCodeStatusCodeReportWorker, TPL_HIGH_LEVEL);
   ASSERT_EFI_ERROR (Status);
-  mRegisted = TRUE;
+  mPostCodeRegisted = TRUE;
 
   Status = gBS->CreateEventEx (
                   EVT_NOTIFY_SIGNAL,
@@ -123,7 +123,7 @@ RegisterPostCodeBootTimeHandlers (
                   UnregisterPostCodeBootTimeHandlers,
                   NULL,
                   &gEfiEventExitBootServicesGuid,
-                  &mExitBootServicesEvent
+                  &mPostCodeExitBootServicesEvent
                   );
   ASSERT_EFI_ERROR (Status);
 }
@@ -158,7 +158,7 @@ RuntimeDxePostCodeStatusCodeHandlerLibConstructor (
   Status = gBS->LocateProtocol (
                   &gEfiRscHandlerProtocolGuid,
                   NULL,
-                  (VOID **) &mRscHandlerProtocol
+                  (VOID **) &mPostCodeRscHandlerProtocol
                   );
 
   if (!EFI_ERROR (Status)) {
-- 
2.24.0.windows.2


             reply	other threads:[~2020-06-22  7:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22  7:32 Tan, Ming [this message]
2020-06-22  7:41 ` [edk2-devel] [PATCH] Features/Intel/Debugging: Fix build error when use Xcode Dong, Eric

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200622073249.5329-1-ming.tan@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox