diff options
author | Laszlo Ersek <lersek@redhat.com> | 2016-02-14 08:17:16 +0100 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-02-24 15:31:50 +0800 |
commit | 8c7c7414c0f9b4c2404a31a4c4c7f34469285ff9 (patch) | |
tree | 9ed579dc82af87dd9c4b4f7332b4fb80b9ccc313 /BaseTools/Source | |
parent | a5b41f761d91ddda9934be850ddd54a8dff2363c (diff) | |
download | edk2-platforms-8c7c7414c0f9b4c2404a31a4c4c7f34469285ff9.tar.xz |
BaseTools: LzmaCompress: fix gcc-6 warning "misleading-indentation"
The way the first use of the "_maxMode" variable is commented out (i.e.,
together with the enclosing "if" statement) in GetOptimum() triggers the
"misleading-indentation" warning that is new in gcc-6.0, for the block of
code that originally depended on the "if" statement. Gcc believes
(mistakenly) that the programmer believes (mistakenly) that the block
depends on (repIndex == 0) higher up.
Restore the if statement, with a controlling expression that comprises the
constant 1 and "_maxMode" commented out.
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Cole Robinson <crobinso@redhat.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Reported-by: Cole Robinson <crobinso@redhat.com>
Suggested-by: Jordan Justen <jordan.l.justen@intel.com>
Build-tested-by: Cole Robinson <crobinso@redhat.com>
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1307439
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
(cherry picked from commit 6cc7ada465a7c5a6dab6e32abd5a4b6f1734c1d0)
Diffstat (limited to 'BaseTools/Source')
-rw-r--r-- | BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c index 9b2dd16ffa..c6717eeea3 100644 --- a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c +++ b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c @@ -1367,7 +1367,7 @@ static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes) if (repIndex == 0)
startLen = lenTest + 1;
- /* if (_maxMode) */
+ if (1 /* _maxMode */)
{
UInt32 lenTest2 = lenTest + 1;
UInt32 limit = lenTest2 + p->numFastBytes;
|