From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web12.4757.1602652013459908827 for ; Tue, 13 Oct 2020 22:06:54 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Wed, 14 Oct 2020 13:06:48 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , "'Yunhua Feng'" References: <20201014024929.1945-1-fengyunhua@byosoft.com.cn> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW2VkazItc3RhZ2luZ11bUEFUQ0ggdjJdIEJhc2VUb29scy9GbW10OiBGaXhlZCBGTU1UIExpbnV4IGJ1aWxkIGJyZWFrIGlzc3Vl?= Date: Wed, 14 Oct 2020 13:06:50 +0800 Message-ID: <003501d6a1e7$d34a5670$79df0350$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQKmCtt2GFIcYSH1ph61w2joa9kx/wGcAI9up+rZ5dA= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Reviewed-by: Liming Gao > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: bounce+27952+66201+4905953+8761045@groups.io > =B4=FA=B1=ED Bob Feng > =B7=A2=CB=CD=CA=B1=BC=E4: 2020=C4=EA10=D4=C214=C8=D5 11:11 > =CA=D5=BC=FE=C8=CB: Yunhua Feng ; devel@edk2.= groups.io > =B3=AD=CB=CD: Liming Gao > =D6=F7=CC=E2: Re: [edk2-devel] [edk2-staging][PATCH v2] BaseTools/Fmmt: = Fixed > FMMT Linux build break issue >=20 > This patch looks good. >=20 > Reviewed-by: Bob Feng >=20 > -----Original Message----- > From: Yunhua Feng > Sent: Wednesday, October 14, 2020 10:49 AM > To: devel@edk2.groups.io > Cc: Feng, Bob C ; Liming Gao > > Subject: [edk2-staging][PATCH v2] BaseTools/Fmmt: Fixed FMMT Linux build > break issue >=20 > Remove some defined variable but not used. > Linux build option[-Werror=3Dunused-but-set-variable] treat all warnings= as > errors. >=20 > Cc: Bob Feng > Cc: Liming Gao >=20 > Signed-off-by: Yunhua Feng > --- > BaseTools/Source/C/FMMT/FirmwareModuleManagement.c | 14 > ++------------ > 1 file changed, 2 insertions(+), 12 deletions(-) >=20 > diff --git a/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c > b/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c > index 20663ba163..38056153fb 100644 > --- a/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c > +++ b/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c > @@ -1717,11 +1717,6 @@ FmmtImageExtract ( > FV_INFORMATION *FvInFd; > UINT32 Index; > UINT32 FfsFoundFlag; > - FFS_INFORMATION *OutputFileName; > - FILE* NewFdFile; > - FILE* NewFvFile; > - UINT64 NewFvLength; > - VOID* Buffer; > CHAR8 *TemDir; > UINT8 FvNumInFd; > UINT32 Offset; > @@ -1736,23 +1731,18 @@ FmmtImageExtract ( > UINT32 FfsSize; > UINT32 FdSize; > int j; > - CHAR8 FfsOutputFileName[_MAX_DIR]; > + CHAR8 FfsOutputFileName[_MAX_PATH]; >=20 > FdSize =3D 0; > Index =3D 0; > - NewFvLength =3D 0; > FfsFoundFlag =3D 0; > FdData =3D NULL; > FvInFd =3D NULL; > - OutputFileName =3D NULL; > - NewFdFile =3D NULL; > - NewFvFile =3D NULL; > - Buffer =3D NULL; > TemDir =3D NULL; > FvNumInFd =3D 0; > Offset =3D 0; > FdBuffer =3D NULL; > - if (sizeof(FfsOutFileOrDirName) > _MAX_DIR) { > + if (strlen(FfsOutFileOrDirName) > _MAX_PATH - 1) { > Error("FMMT", 0, 0004, "error while input file name", "Output directory > path is too long" ); > return EFI_ABORTED; > } > -- > 2.27.0.windows.1 >=20 >=20 >=20 >=20 >=20 >=20