From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 615A38208D for ; Sun, 18 Dec 2016 23:21:10 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP; 18 Dec 2016 23:21:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,372,1477983600"; d="scan'208";a="44357842" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by fmsmga005.fm.intel.com with ESMTP; 18 Dec 2016 23:21:09 -0800 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Feng Tian Date: Mon, 19 Dec 2016 15:20:21 +0800 Message-Id: <1482132023-10416-7-git-send-email-dandan.bi@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1482132023-10416-1-git-send-email-dandan.bi@intel.com> References: <1482132023-10416-1-git-send-email-dandan.bi@intel.com> Subject: [patch 6/8] MdeModulePkg/TerminalDxe: 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, 19 Dec 2016 07:21:10 -0000 Cc: Feng Tian Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi --- MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c index 9625f4d..c9b4ffc 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c @@ -186,10 +186,11 @@ TerminalConOutOutputString ( UTF8_CHAR Utf8Char; CHAR8 GraphicChar; CHAR8 AsciiChar; EFI_STATUS Status; UINT8 ValidBytes; + CHAR8 CrLfStr[2]; // // flag used to indicate whether condition happens which will cause // return EFI_WARN_UNKNOWN_GLYPH // BOOLEAN Warning; @@ -324,11 +325,12 @@ TerminalConOutOutputString ( // the next character, but the driver thinks it has wrapped // already. Print CR LF to synchronize the terminal with // the driver, but only if we're not in the middle of // printing an escape sequence. // - CHAR8 CrLfStr[] = {'\r', '\n'}; + CrLfStr[0] = '\r'; + CrLfStr[1] = '\n'; Length = sizeof(CrLfStr); Status = TerminalDevice->SerialIo->Write ( TerminalDevice->SerialIo, -- 1.9.5.msysgit.1