]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: fix LzmaCompress VS2013 make failure
authorYonghong Zhu <yonghong.zhu@intel.com>
Mon, 29 Feb 2016 03:18:12 +0000 (11:18 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Mon, 29 Feb 2016 09:56:48 +0000 (17:56 +0800)
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 <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c

index c6717eeea3a0d936569b93783ec710fd798f5de9..297db9d54d42d0b8a023cb43a7e808c434b12f0b 100644 (file)
@@ -1366,8 +1366,9 @@ static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes)
       \r
       if (repIndex == 0)\r
         startLen = lenTest + 1;\r
-        \r
+      #ifndef _MSC_VER\r
       if (1 /* _maxMode */)\r
+      #endif\r
         {\r
           UInt32 lenTest2 = lenTest + 1;\r
           UInt32 limit = lenTest2 + p->numFastBytes;\r