From b0c583cdd19cc6316cbda82cb79df4346a7db8c7 Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Mon, 29 Feb 2016 11:18:12 +0800 Subject: [PATCH] BaseTools: fix LzmaCompress VS2013 make failure when make BaseTools by VS2013, LzmaEnc.c report warning C4127: conditional expression is constant, so this patch fix this issue. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c index c6717eeea3..297db9d54d 100644 --- a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c +++ b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c @@ -1366,8 +1366,9 @@ static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes) if (repIndex == 0) startLen = lenTest + 1; - + #ifndef _MSC_VER if (1 /* _maxMode */) + #endif { UInt32 lenTest2 = lenTest + 1; UInt32 limit = lenTest2 + p->numFastBytes;