BaseTools: Fix two warning reported in the make phase.
when we make BaseTools, it report warnings about VfrError.cpp and VolInfo, so this patch fix this warning. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18851 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -280,7 +280,7 @@ CVfrErrorHandle::HandleWarning (
|
|||||||
GetFileNameLineNum (LineNum, &FileName, &FileLine);
|
GetFileNameLineNum (LineNum, &FileName, &FileLine);
|
||||||
|
|
||||||
if (mWarningAsError) {
|
if (mWarningAsError) {
|
||||||
Error (FileName, FileLine, 0x2220, "warning treated as error", NULL);
|
Error (FileName, FileLine, 0x2220, (CHAR8 *) "warning treated as error", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Index = 0; mVfrWarningHandleTable[Index].mWarningCode != VFR_WARNING_CODEUNDEFINED; Index++) {
|
for (Index = 0; mVfrWarningHandleTable[Index].mWarningCode != VFR_WARNING_CODEUNDEFINED; Index++) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The tool dumps the contents of a firmware volume
|
The tool dumps the contents of a firmware volume
|
||||||
|
|
||||||
Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -17,6 +17,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <FvLib.h>
|
#include <FvLib.h>
|
||||||
#include <Common/UefiBaseTypes.h>
|
#include <Common/UefiBaseTypes.h>
|
||||||
@ -1422,9 +1425,21 @@ Returns:
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (ExtractionTool != NULL) {
|
if (ExtractionTool != NULL) {
|
||||||
|
#ifndef __GNUC__
|
||||||
ToolInputFile = CloneString (tmpnam (NULL));
|
ToolInputFile = CloneString (tmpnam (NULL));
|
||||||
ToolOutputFile = CloneString (tmpnam (NULL));
|
ToolOutputFile = CloneString (tmpnam (NULL));
|
||||||
|
#else
|
||||||
|
char tmp1[] = "/tmp/fileXXXXXX";
|
||||||
|
char tmp2[] = "/tmp/fileXXXXXX";
|
||||||
|
int fd1;
|
||||||
|
int fd2;
|
||||||
|
fd1 = mkstemp(tmp1);
|
||||||
|
fd2 = mkstemp(tmp2);
|
||||||
|
ToolInputFile = CloneString(tmp1);
|
||||||
|
ToolOutputFile = CloneString(tmp2);
|
||||||
|
close(fd1);
|
||||||
|
close(fd2);
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Construction 'system' command string
|
// Construction 'system' command string
|
||||||
|
Reference in New Issue
Block a user