summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2016-12-01 15:11:50 +0800
committerStar Zeng <star.zeng@intel.com>2016-12-06 18:40:14 +0800
commit8fd543c77a5767646b45c8fe11c49f7bc6e3696b (patch)
treeb78e3ce2a8b38372c187c7387cc36b985f4479a3
parente8a5ac7c4991825deb4e2e5cf060c3e90f68e8e5 (diff)
downloadedk2-platforms-8fd543c77a5767646b45c8fe11c49f7bc6e3696b.tar.xz
MdeModulePkg/EbcDxe: Initialize variable after declaration
Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Pete Batard <pete@akeo.ie> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jiewen.yao@intel.com
-rw-r--r--MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c4
-rw-r--r--MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c
index 6953f1627f..c002d65871 100644
--- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c
+++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c
@@ -487,7 +487,9 @@ EdbExceptionHandler (
CHAR16 *CommandArg;
EFI_DEBUGGER_COMMAND DebuggerCommand;
EFI_DEBUG_STATUS DebugStatus;
- STATIC BOOLEAN mInitialized = FALSE;
+ STATIC BOOLEAN mInitialized;
+
+ mInitialized = FALSE;
DEBUG ((DEBUG_ERROR, "Hello EBC Debugger!\n"));
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c
index 1c3a8465f3..de9ad8bb59 100644
--- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c
+++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c
@@ -1183,11 +1183,13 @@ EdbLoadCodBySymbolByIec (
VOID *BufferEnd;
UINTN Offset;
EDB_EBC_COD_PARSE_STATE CodParseState;
- CHAR8 Char[2] = {9, 0};
+ CHAR8 Char[2];
//
// Init
//
+ Char[0] = 9;
+ Char[1] = 0;
LineBuffer = AsciiStrGetNewTokenLine (Buffer, "\n\r");
Offset = (UINTN)-1;
BufferStart = NULL;