From: Dandan Bi <dandan.bi@intel.com>
To: edk2-devel@lists.01.org
Cc: Jiewen Yao <jiewen.yao@intel.com>, Pete Batard <pete@akeo.ie>
Subject: [patch 2/5] MdeModulePkg/EbcDxe: Initialize variable after declaration
Date: Mon, 5 Dec 2016 13:27:18 +0800 [thread overview]
Message-ID: <1480915641-59136-3-git-send-email-dandan.bi@intel.com> (raw)
In-Reply-To: <1480915641-59136-1-git-send-email-dandan.bi@intel.com>
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>
---
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
next prev parent reply other threads:[~2016-12-05 5:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-05 5:27 [patch 0/5] MdeModulePkg/EbcDxe: Fix coding style issues Dandan Bi
2016-12-05 5:27 ` [patch 1/5] MdeModulePkg/EbcDxe: Make the comments align with EDKII coding style Dandan Bi
2016-12-05 5:27 ` Dandan Bi [this message]
2016-12-05 5:27 ` [patch 3/5] MdeModulePkg/EbcDxe: Make the variable name follow rules Dandan Bi
2016-12-05 5:27 ` [patch 4/5] MdeModulePkg/EbcDxe: Avoid Non-Boolean type used as Boolean Dandan Bi
2016-12-05 5:27 ` [patch 5/5] MdeModulePkg/EbcDxe: Add comments for functions Dandan Bi
2016-12-05 12:45 ` [patch 0/5] MdeModulePkg/EbcDxe: Fix coding style issues Yao, Jiewen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1480915641-59136-3-git-send-email-dandan.bi@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox