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
This commit is contained in:
qhuang8 2008-08-18 08:40:52 +00:00
parent 35f8f32669
commit 4fdc91291e
1 changed files with 17 additions and 18 deletions

View File

@ -212,24 +212,24 @@ CoreNotifyOnArchProtocolInstallation (
// Following is needed to display missing architectural protocols in debug builds // Following is needed to display missing architectural protocols in debug builds
// //
typedef struct { typedef struct {
EFI_GUID *ProtocolGuid; EFI_GUID *ProtocolGuid;
CHAR16 *GuidString; CHAR8 *GuidString;
} GUID_TO_STRING_PROTOCOL_ENTRY; } GUID_TO_STRING_PROTOCOL_ENTRY;
CONST GUID_TO_STRING_PROTOCOL_ENTRY MissingProtocols[] = { GLOBAL_REMOVE_IF_UNREFERENCED CONST GUID_TO_STRING_PROTOCOL_ENTRY MissingProtocols[] = {
{ &gEfiSecurityArchProtocolGuid, (CHAR16 *)L"Security" }, { &gEfiSecurityArchProtocolGuid, "Security" },
{ &gEfiCpuArchProtocolGuid, (CHAR16 *)L"CPU" }, { &gEfiCpuArchProtocolGuid, "CPU" },
{ &gEfiMetronomeArchProtocolGuid, (CHAR16 *)L"Metronome" }, { &gEfiMetronomeArchProtocolGuid, "Metronome" },
{ &gEfiTimerArchProtocolGuid, (CHAR16 *)L"Timer" }, { &gEfiTimerArchProtocolGuid, "Timer" },
{ &gEfiBdsArchProtocolGuid, (CHAR16 *)L"Bds" }, { &gEfiBdsArchProtocolGuid, "Bds" },
{ &gEfiWatchdogTimerArchProtocolGuid, (CHAR16 *)L"Watchdog Timer" }, { &gEfiWatchdogTimerArchProtocolGuid, "Watchdog Timer" },
{ &gEfiRuntimeArchProtocolGuid, (CHAR16 *)L"Runtime" }, { &gEfiRuntimeArchProtocolGuid, "Runtime" },
{ &gEfiVariableArchProtocolGuid, (CHAR16 *)L"Variable" }, { &gEfiVariableArchProtocolGuid, "Variable" },
{ &gEfiVariableWriteArchProtocolGuid, (CHAR16 *)L"Variable Write" }, { &gEfiVariableWriteArchProtocolGuid, "Variable Write" },
{ &gEfiCapsuleArchProtocolGuid, (CHAR16 *)L"Capsule" }, { &gEfiCapsuleArchProtocolGuid, "Capsule" },
{ &gEfiMonotonicCounterArchProtocolGuid, (CHAR16 *)L"Monotonic Counter" }, { &gEfiMonotonicCounterArchProtocolGuid, "Monotonic Counter" },
{ &gEfiResetArchProtocolGuid, (CHAR16 *)L"Reset" }, { &gEfiResetArchProtocolGuid, "Reset" },
{ &gEfiRealTimeClockArchProtocolGuid, (CHAR16 *)L"Real Time Clock" } { &gEfiRealTimeClockArchProtocolGuid, "Real Time Clock" }
}; };
@ -248,10 +248,9 @@ CoreDisplayMissingArchProtocols (
for (Entry = mArchProtocols; Entry->ProtocolGuid != NULL; Entry++) { for (Entry = mArchProtocols; Entry->ProtocolGuid != NULL; Entry++) {
if (!Entry->Present) { if (!Entry->Present) {
MissingEntry = MissingProtocols;
for (MissingEntry = MissingProtocols; TRUE ; MissingEntry++) { for (MissingEntry = MissingProtocols; TRUE ; MissingEntry++) {
if (CompareGuid (Entry->ProtocolGuid, MissingEntry->ProtocolGuid)) { 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; break;
} }
} }