From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CD26381FE8 for ; Sun, 4 Dec 2016 21:27:50 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 04 Dec 2016 21:27:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,303,1477983600"; d="scan'208";a="13634146" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga002.jf.intel.com with ESMTP; 04 Dec 2016 21:27:49 -0800 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Jiewen Yao , Pete Batard Date: Mon, 5 Dec 2016 13:27:18 +0800 Message-Id: <1480915641-59136-3-git-send-email-dandan.bi@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1480915641-59136-1-git-send-email-dandan.bi@intel.com> References: <1480915641-59136-1-git-send-email-dandan.bi@intel.com> Subject: [patch 2/5] MdeModulePkg/EbcDxe: Initialize variable after declaration X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Dec 2016 05:27:51 -0000 Cc: Jiewen Yao Cc: Pete Batard Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi --- MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c | 4 +++- MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c index 6953f16..c002d65 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c +++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c @@ -485,11 +485,13 @@ EdbExceptionHandler ( { CHAR16 InputBuffer[EFI_DEBUG_INPUS_BUFFER_SIZE]; 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")); if (!mInitialized) { // diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c index 9ae0141..f03a322 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c +++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSymbol.c @@ -1181,15 +1181,17 @@ EdbLoadCodBySymbolByIec ( CHAR8 *FieldBuffer; VOID *BufferStart; 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; BufferEnd = NULL; CodParseState = EdbEbcCodParseStateUninitialized; -- 1.9.5.msysgit.1