On 2016-02-28 19:23:35, Yonghong Zhu wrote:
> 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 <[email protected]>
> ---
>  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 c6717ee..297db9d 100644
> --- a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c
> +++ b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c
> @@ -1364,12 +1364,13 @@ static UInt32 GetOptimum(CLzmaEnc *p, UInt32 
> position, UInt32 *backRes)
>        while (--lenTest >= 2);
>        lenTest = lenTestTemp;
>        
>        if (repIndex == 0)
>          startLen = lenTest + 1;
> -        

There's no need to remove this blank line, and if we leave it it will
better compare with the original LZMA source code.

> +      #ifndef _MSC_VER

You shouldn't indent the #ifndef or #endif.

With those fixes: Reviewed-by: Jordan Justen <[email protected]>

>        if (1 /* _maxMode */)
> +      #endif
>          {
>            UInt32 lenTest2 = lenTest + 1;
>            UInt32 limit = lenTest2 + p->numFastBytes;
>            UInt32 nextRepMatchPrice;
>            if (limit > numAvailFull)
> -- 
> 2.6.1.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to