Revision: 19073
http://sourceforge.net/p/edk2/code/19073
Author: vanjeff
Date: 2015-12-01 02:30:17 +0000 (Tue, 01 Dec 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.
(Sync patch r18851 from main trunk.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/18851
Modified Paths:
--------------
branches/UDK2015/BaseTools/Source/C/VfrCompile/VfrError.cpp
branches/UDK2015/BaseTools/Source/C/VolInfo/VolInfo.c
Modified: branches/UDK2015/BaseTools/Source/C/VfrCompile/VfrError.cpp
===================================================================
--- branches/UDK2015/BaseTools/Source/C/VfrCompile/VfrError.cpp 2015-12-01
01:56:57 UTC (rev 19072)
+++ branches/UDK2015/BaseTools/Source/C/VfrCompile/VfrError.cpp 2015-12-01
02:30:17 UTC (rev 19073)
@@ -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: branches/UDK2015/BaseTools/Source/C/VolInfo/VolInfo.c
===================================================================
--- branches/UDK2015/BaseTools/Source/C/VolInfo/VolInfo.c 2015-12-01
01:56:57 UTC (rev 19072)
+++ branches/UDK2015/BaseTools/Source/C/VolInfo/VolInfo.c 2015-12-01
02:30:17 UTC (rev 19073)
@@ -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
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits