Revision: 18851
http://sourceforge.net/p/edk2/code/18851
Author: yzhu52
Date: 2015-11-17 07:40:00 +0000 (Tue, 17 Nov 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Modified Paths:
--------------
trunk/edk2/BaseTools/Source/C/VfrCompile/VfrError.cpp
trunk/edk2/BaseTools/Source/C/VolInfo/VolInfo.c
Modified: trunk/edk2/BaseTools/Source/C/VfrCompile/VfrError.cpp
===================================================================
--- trunk/edk2/BaseTools/Source/C/VfrCompile/VfrError.cpp 2015-11-17
05:14:39 UTC (rev 18850)
+++ trunk/edk2/BaseTools/Source/C/VfrCompile/VfrError.cpp 2015-11-17
07:40:00 UTC (rev 18851)
@@ -280,7 +280,7 @@
GetFileNameLineNum (LineNum, &FileName, &FileLine);
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++) {
Modified: trunk/edk2/BaseTools/Source/C/VolInfo/VolInfo.c
===================================================================
--- trunk/edk2/BaseTools/Source/C/VolInfo/VolInfo.c 2015-11-17 05:14:39 UTC
(rev 18850)
+++ trunk/edk2/BaseTools/Source/C/VolInfo/VolInfo.c 2015-11-17 07:40:00 UTC
(rev 18851)
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -17,6 +17,9 @@
#include <string.h>
#include <ctype.h>
#include <assert.h>
+#ifdef __GNUC__
+#include <unistd.h>
+#endif
#include <FvLib.h>
#include <Common/UefiBaseTypes.h>
@@ -1422,9 +1425,21 @@
);
if (ExtractionTool != NULL) {
-
+ #ifndef __GNUC__
ToolInputFile = 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
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits