From 4fdc91291ed3d67c5e9315e662aab847d23b7512 Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Mon, 18 Aug 2008 08:40:52 +0000 Subject: [PATCH] Add GLOBAL_REMOVE_IF_UNREFERENCED modifier in the array and change the protocol UI strings to ASCII string since they are only for debug purpose. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5672 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Core/Dxe/DxeMain/DxeProtocolNotify.c | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c index 3b0c6eb3ef..7bce6185c6 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c @@ -212,24 +212,24 @@ CoreNotifyOnArchProtocolInstallation ( // Following is needed to display missing architectural protocols in debug builds // typedef struct { - EFI_GUID *ProtocolGuid; - CHAR16 *GuidString; + EFI_GUID *ProtocolGuid; + CHAR8 *GuidString; } GUID_TO_STRING_PROTOCOL_ENTRY; -CONST GUID_TO_STRING_PROTOCOL_ENTRY MissingProtocols[] = { - { &gEfiSecurityArchProtocolGuid, (CHAR16 *)L"Security" }, - { &gEfiCpuArchProtocolGuid, (CHAR16 *)L"CPU" }, - { &gEfiMetronomeArchProtocolGuid, (CHAR16 *)L"Metronome" }, - { &gEfiTimerArchProtocolGuid, (CHAR16 *)L"Timer" }, - { &gEfiBdsArchProtocolGuid, (CHAR16 *)L"Bds" }, - { &gEfiWatchdogTimerArchProtocolGuid, (CHAR16 *)L"Watchdog Timer" }, - { &gEfiRuntimeArchProtocolGuid, (CHAR16 *)L"Runtime" }, - { &gEfiVariableArchProtocolGuid, (CHAR16 *)L"Variable" }, - { &gEfiVariableWriteArchProtocolGuid, (CHAR16 *)L"Variable Write" }, - { &gEfiCapsuleArchProtocolGuid, (CHAR16 *)L"Capsule" }, - { &gEfiMonotonicCounterArchProtocolGuid, (CHAR16 *)L"Monotonic Counter" }, - { &gEfiResetArchProtocolGuid, (CHAR16 *)L"Reset" }, - { &gEfiRealTimeClockArchProtocolGuid, (CHAR16 *)L"Real Time Clock" } +GLOBAL_REMOVE_IF_UNREFERENCED CONST GUID_TO_STRING_PROTOCOL_ENTRY MissingProtocols[] = { + { &gEfiSecurityArchProtocolGuid, "Security" }, + { &gEfiCpuArchProtocolGuid, "CPU" }, + { &gEfiMetronomeArchProtocolGuid, "Metronome" }, + { &gEfiTimerArchProtocolGuid, "Timer" }, + { &gEfiBdsArchProtocolGuid, "Bds" }, + { &gEfiWatchdogTimerArchProtocolGuid, "Watchdog Timer" }, + { &gEfiRuntimeArchProtocolGuid, "Runtime" }, + { &gEfiVariableArchProtocolGuid, "Variable" }, + { &gEfiVariableWriteArchProtocolGuid, "Variable Write" }, + { &gEfiCapsuleArchProtocolGuid, "Capsule" }, + { &gEfiMonotonicCounterArchProtocolGuid, "Monotonic Counter" }, + { &gEfiResetArchProtocolGuid, "Reset" }, + { &gEfiRealTimeClockArchProtocolGuid, "Real Time Clock" } }; @@ -248,10 +248,9 @@ CoreDisplayMissingArchProtocols ( for (Entry = mArchProtocols; Entry->ProtocolGuid != NULL; Entry++) { if (!Entry->Present) { - MissingEntry = MissingProtocols; for (MissingEntry = MissingProtocols; TRUE ; MissingEntry++) { if (CompareGuid (Entry->ProtocolGuid, MissingEntry->ProtocolGuid)) { - DEBUG ((DEBUG_ERROR, "\n%s Arch Protocol not present!!\n", MissingEntry->GuidString)); + DEBUG ((DEBUG_ERROR, "\n%a Arch Protocol not present!!\n", MissingEntry->GuidString)); break; } } -- 2.39.2