From 8f964e8d1eb21fa9fbdd689af59d220290160a3e Mon Sep 17 00:00:00 2001 From: oliviermartin Date: Mon, 26 Mar 2012 12:28:05 +0000 Subject: [PATCH] EmbeddedPkg/MmcDxe: Fixed XCLANG build Move the constant array from its declaration inside the function to a global declaration. Signed-off-by: Andrew Fish Reviewed-by: Olivier Martin git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13140 6f19259b-4bc3-4df7-8a09-765794883524 --- EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c b/EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c index 47f4aebcdf..8940f519b7 100644 --- a/EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c +++ b/EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c @@ -83,16 +83,17 @@ VOID PrintCID ( DEBUG((EFI_D_ERROR, "\t- OEM ID: %c%c\n",(Cid[3] >> 8) & 0xFF,(Cid[3] >> 16) & 0xFF)); } +#if !defined(MDEPKG_NDEBUG) +CONST CHAR8* mStrUnit[] = { "100kbit/s","1Mbit/s","10Mbit/s","100MBit/s","Unkbown","Unkbown","Unkbown","Unkbown" }; +CONST CHAR8* mStrValue[] = { "1.0","1.2","1.3","1.5","2.0","2.5","3.0","3.5","4.0","4.5","5.0","Unknown","Unknown","Unknown","Unknown" }; +#endif + VOID PrintCSD ( IN UINT32* Csd ) { UINTN Value; -#if !defined(MDEPKG_NDEBUG) - CONST CHAR8* str_unit[] = { "100kbit/s","1Mbit/s","10Mbit/s","100MBit/s","Unkbown","Unkbown","Unkbown","Unkbown" }; - CONST CHAR8* str_value[] = { "1.0","1.2","1.3","1.5","2.0","2.5","3.0","3.5","4.0","4.5","5.0","Unknown","Unknown","Unknown","Unknown" }; -#endif if (((Csd[2] >> 30) & 0x3) == 0) { DEBUG((EFI_D_ERROR, "- PrintCSD Version 1.01-1.10/Version 2.00/Standard Capacity\n")); @@ -103,7 +104,7 @@ PrintCSD ( } DEBUG((EFI_D_ERROR, "\t- Supported card command class: 0x%X\n",MMC_CSD_GET_CCC(Csd))); - DEBUG((EFI_D_ERROR, "\t- Speed: %a %a\n",str_value[(MMC_CSD_GET_TRANSPEED(Csd) >> 3) & 0xF],str_unit[MMC_CSD_GET_TRANSPEED(Csd) & 7])); + DEBUG((EFI_D_ERROR, "\t- Speed: %a %a\n",mStrValue[(MMC_CSD_GET_TRANSPEED(Csd) >> 3) & 0xF],mStrUnit[MMC_CSD_GET_TRANSPEED(Csd) & 7])); DEBUG((EFI_D_ERROR, "\t- Maximum Read Data Block: %d\n",2 << (MMC_CSD_GET_READBLLEN(Csd)-1))); DEBUG((EFI_D_ERROR, "\t- Maximum Write Data Block: %d\n",2 << (MMC_CSD_GET_WRITEBLLEN(Csd)-1)));