* [edk2-staging][PATCH v2] BaseTools/Fmmt: Fixed FMMT Linux build break issue
@ 2020-10-14 2:49 fengyunhua
2020-10-14 3:10 ` Bob Feng
0 siblings, 1 reply; 4+ messages in thread
From: fengyunhua @ 2020-10-14 2:49 UTC (permalink / raw)
To: devel; +Cc: Bob Feng, Liming Gao
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@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Yunhua Feng <fengyunhua@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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [edk2-staging][PATCH v2] BaseTools/Fmmt: Fixed FMMT Linux build break issue
2020-10-14 2:49 [edk2-staging][PATCH v2] BaseTools/Fmmt: Fixed FMMT Linux build break issue fengyunhua
@ 2020-10-14 3:10 ` Bob Feng
2020-10-14 5:06 ` 回复: [edk2-devel] " gaoliming
0 siblings, 1 reply; 4+ messages in thread
From: Bob Feng @ 2020-10-14 3:10 UTC (permalink / raw)
To: Yunhua Feng, devel@edk2.groups.io; +Cc: Liming Gao
This patch looks good.
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
-----Original Message-----
From: Yunhua Feng <fengyunhua@byosoft.com.cn>
Sent: Wednesday, October 14, 2020 10:49 AM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao <gaoliming@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@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Yunhua Feng <fengyunhua@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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* 回复: [edk2-devel] [edk2-staging][PATCH v2] BaseTools/Fmmt: Fixed FMMT Linux build break issue
2020-10-14 3:10 ` Bob Feng
@ 2020-10-14 5:06 ` gaoliming
2020-10-15 0:56 ` Bob Feng
0 siblings, 1 reply; 4+ messages in thread
From: gaoliming @ 2020-10-14 5:06 UTC (permalink / raw)
To: devel, bob.c.feng, 'Yunhua Feng'
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
> -----邮件原件-----
> 发件人: bounce+27952+66201+4905953+8761045@groups.io
> <bounce+27952+66201+4905953+8761045@groups.io> 代表 Bob Feng
> 发送时间: 2020年10月14日 11:11
> 收件人: Yunhua Feng <fengyunhua@byosoft.com.cn>; devel@edk2.groups.io
> 抄送: Liming Gao <gaoliming@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@intel.com>
>
> -----Original Message-----
> From: Yunhua Feng <fengyunhua@byosoft.com.cn>
> Sent: Wednesday, October 14, 2020 10:49 AM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@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@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
>
> Signed-off-by: Yunhua Feng <fengyunhua@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
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [edk2-staging][PATCH v2] BaseTools/Fmmt: Fixed FMMT Linux build break issue
2020-10-14 5:06 ` 回复: [edk2-devel] " gaoliming
@ 2020-10-15 0:56 ` Bob Feng
0 siblings, 0 replies; 4+ messages in thread
From: Bob Feng @ 2020-10-15 0:56 UTC (permalink / raw)
To: devel@edk2.groups.io, gaoliming@byosoft.com.cn,
'Yunhua Feng'
This patch was pushed at f6d0a6fe01
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of gaoliming
Sent: Wednesday, October 14, 2020 1:07 PM
To: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>; 'Yunhua Feng' <fengyunhua@byosoft.com.cn>
Subject: 回复: [edk2-devel] [edk2-staging][PATCH v2] BaseTools/Fmmt: Fixed FMMT Linux build break issue
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
> -----邮件原件-----
> 发件人: bounce+27952+66201+4905953+8761045@groups.io
> <bounce+27952+66201+4905953+8761045@groups.io> 代表 Bob Feng
> 发送时间: 2020年10月14日 11:11
> 收件人: Yunhua Feng <fengyunhua@byosoft.com.cn>; devel@edk2.groups.io
> 抄送: Liming Gao <gaoliming@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@intel.com>
>
> -----Original Message-----
> From: Yunhua Feng <fengyunhua@byosoft.com.cn>
> Sent: Wednesday, October 14, 2020 10:49 AM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@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@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
>
> Signed-off-by: Yunhua Feng <fengyunhua@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
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-10-15 0:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-14 2:49 [edk2-staging][PATCH v2] BaseTools/Fmmt: Fixed FMMT Linux build break issue fengyunhua
2020-10-14 3:10 ` Bob Feng
2020-10-14 5:06 ` 回复: [edk2-devel] " gaoliming
2020-10-15 0:56 ` Bob Feng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox