summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C/LzmaCompress/LzmaCompress.c
diff options
context:
space:
mode:
authorBruce Cran <bruce@cran.org.uk>2015-07-08 01:06:25 +0000
committeryingke <yingke@Edk2>2015-07-08 01:06:25 +0000
commit5ddccf34c4f57e6e7fca767c1628a0d98ce8bdaf (patch)
tree1f14236972c9e584140158b471c6b311c4dec7c1 /BaseTools/Source/C/LzmaCompress/LzmaCompress.c
parente109e3fec9245e3fa777802d17e00431e349a6bd (diff)
downloadedk2-platforms-5ddccf34c4f57e6e7fca767c1628a0d98ce8bdaf.tar.xz
BaseTools: Fix build on FreeBSD and allow use of non-gcc system compiler
On FreeBSD, uuid.h is in /usr/include, not /usr/include/uuid. Fix some errors when building using clang caused by self-assignment: the preferred way to 'use' a variable is '(void)x;', not 'x = x;'. Where the system provides $(CC) etc. by default, don't override it to be gcc. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bruce Cran <bruce@cran.org.uk> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17866 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/C/LzmaCompress/LzmaCompress.c')
-rw-r--r--BaseTools/Source/C/LzmaCompress/LzmaCompress.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/C/LzmaCompress/LzmaCompress.c b/BaseTools/Source/C/LzmaCompress/LzmaCompress.c
index b569b4e4d9..1de07a3541 100644
--- a/BaseTools/Source/C/LzmaCompress/LzmaCompress.c
+++ b/BaseTools/Source/C/LzmaCompress/LzmaCompress.c
@@ -43,8 +43,8 @@ const char *kCantWriteMessage = "Can not write output file";
const char *kCantAllocateMessage = "Can not allocate memory";
const char *kDataErrorMessage = "Data error";
-static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
-static void SzFree(void *p, void *address) { p = p; MyFree(address); }
+static void *SzAlloc(void *p, size_t size) { (void)p; return MyAlloc(size); }
+static void SzFree(void *p, void *address) { (void)p; MyFree(address); }
static ISzAlloc g_Alloc = { SzAlloc, SzFree };
static Bool mQuietMode = False;