回复: [edk2-devel] [edk2-staging][PATCH v2] BaseTools/Fmmt: Fixed FMMT Linux build break issue

gaoliming gaoliming at byosoft.com.cn
Wed Oct 14 05:06:50 UTC 2020


Reviewed-by: Liming Gao <gaoliming at byosoft.com.cn>

> -----邮件原件-----
> 发件人: bounce+27952+66201+4905953+8761045 at groups.io
> <bounce+27952+66201+4905953+8761045 at groups.io> 代表 Bob Feng
> 发送时间: 2020年10月14日 11:11
> 收件人: Yunhua Feng <fengyunhua at byosoft.com.cn>; devel at edk2.groups.io
> 抄送: Liming Gao <gaoliming at byosoft.com.cn>
> 主题: Re: [edk2-devel] [edk2-staging][PATCH v2] BaseTools/Fmmt: Fixed
> FMMT Linux build break issue
> 
> This patch looks good.
> 
> Reviewed-by: Bob Feng <bob.c.feng at intel.com>
> 
> -----Original Message-----
> From: Yunhua Feng <fengyunhua at byosoft.com.cn>
> Sent: Wednesday, October 14, 2020 10:49 AM
> To: devel at edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng at intel.com>; Liming Gao
> <gaoliming at byosoft.com.cn>
> Subject: [edk2-staging][PATCH v2] BaseTools/Fmmt: Fixed FMMT Linux build
> break issue
> 
> Remove some defined variable but not used.
> Linux build option[-Werror=unused-but-set-variable] treat all warnings  as
> errors.
> 
> Cc: Bob Feng <bob.c.feng at intel.com>
> Cc: Liming Gao <gaoliming at byosoft.com.cn>
> 
> Signed-off-by: Yunhua Feng <fengyunhua at byosoft.com.cn>
> ---
>  BaseTools/Source/C/FMMT/FirmwareModuleManagement.c | 14
> ++------------
>  1 file changed, 2 insertions(+), 12 deletions(-)
> 
> 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];
> 
>    FdSize                      = 0;
>    Index                       = 0;
> -  NewFvLength                 = 0;
>    FfsFoundFlag                = 0;
>    FdData                      = NULL;
>    FvInFd                      = NULL;
> -  OutputFileName              = NULL;
> -  NewFdFile                   = NULL;
> -  NewFvFile                   = NULL;
> -  Buffer                      = NULL;
>    TemDir                      = NULL;
>    FvNumInFd                   = 0;
>    Offset                      = 0;
>    FdBuffer                    = 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
> 
> 
> 
> 
> 
> 





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66202): https://edk2.groups.io/g/devel/message/66202
Mute This Topic: https://groups.io/mt/77499712/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list