From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 979D5820EC for ; Mon, 19 Dec 2016 17:14:26 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP; 19 Dec 2016 17:14:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,376,1477983600"; d="scan'208";a="44731470" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga005.fm.intel.com with ESMTP; 19 Dec 2016 17:14:26 -0800 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 19 Dec 2016 17:14:26 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 19 Dec 2016 17:14:25 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.97]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.11]) with mapi id 14.03.0248.002; Tue, 20 Dec 2016 09:14:23 +0800 From: "Tian, Feng" To: "Bi, Dandan" , "edk2-devel@lists.01.org" CC: "Tian, Feng" Thread-Topic: [patch 6/8] MdeModulePkg/TerminalDxe: Initialize variable after declaration Thread-Index: AQHSWciOCtnU+w8dZUWnPBQd3Si+9KEQCTBg Date: Tue, 20 Dec 2016 01:14:22 +0000 Message-ID: <7F1BAD85ADEA444D97065A60D2E97EE5699900DF@SHSMSX101.ccr.corp.intel.com> References: <1482132023-10416-1-git-send-email-dandan.bi@intel.com> <1482132023-10416-7-git-send-email-dandan.bi@intel.com> In-Reply-To: <1482132023-10416-7-git-send-email-dandan.bi@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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: Tue, 20 Dec 2016 01:14:26 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Feng Tian Thanks Feng -----Original Message----- From: Bi, Dandan=20 Sent: Monday, December 19, 2016 3:20 PM To: edk2-devel@lists.01.org Cc: Tian, Feng Subject: [patch 6/8] MdeModulePkg/TerminalDxe: Initialize variable after de= claration 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[] =3D {'\r', '\n'}; + CrLfStr[0] =3D '\r'; + CrLfStr[1] =3D '\n'; =20 Length =3D sizeof(CrLfStr); =20 Status =3D TerminalDevice->SerialIo->Write ( TerminalDevice->SerialIo, --=20 1.9.5.msysgit.1