]> git.lizzy.rs Git - rust.git/commit
Auto merge of #33798 - locallycompact:lc/misleading-intentation, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 27 May 2016 21:49:10 +0000 (14:49 -0700)
committerbors <bors@rust-lang.org>
Fri, 27 May 2016 21:49:10 +0000 (14:49 -0700)
commit7bddce693cec4ae4eb6970ed91289815b316cff3
treebf4c04ec1766944d48e3b16aca2bc5fa83a18c09
parent17b6261cc41343b1f2b611ca12f1ccd2d4306ee5
parent6e9774f4bb70e2508113a91656d4938935ff2d09
Auto merge of #33798 - locallycompact:lc/misleading-intentation, r=alexcrichton

Fix misleading intentation errors on gcc 6.0

Currently building with latest gcc results in the following error:

    compile: x86_64-unknown-linux-gnu/rt/miniz.o
    /home/lc/rust/src/rt/miniz.c: In function ‘tinfl_decompress’:
    /home/lc/rust/src/rt/miniz.c:578:9: error: this ‘for’ clause does not guard... [-Werror=misleading-indentation]
             for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8;
             ^~~
    /home/lc/rust/src/rt/miniz.c:578:47: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’
             for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8;
                                                   ^~~
    /home/lc/rust/src/rt/miniz.c: In function ‘tdefl_find_match’:
    /home/lc/rust/src/rt/miniz.c:1396:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
         if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break;
         ^~
    /home/lc/rust/src/rt/miniz.c:1396:23: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
         if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break;
                           ^

This patch stops this.