Closed
Description
Here is what I get when I clone rust from github and try to build it with GCC 6.1:
rjammalamadaka/rust/src/rt/miniz.c: In function ‘tinfl_decompress’:
rjammalamadaka/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;
^~~
rjammalamadaka/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;
^~~
rjammalamadaka/rust/src/rt/miniz.c: In function ‘tdefl_find_match’:
rjammalamadaka/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;
^~
rjammalamadaka/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;
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
nagisa commentedon Apr 27, 2016
NOTE: I edited you message to format the report.
durka commentedon Apr 28, 2016
Should we fix the code, or just turn off the warning? It looks like miniz.c was imported wholesale from somewhere else...
frewsxcv commentedon Apr 29, 2016
Worth mentioning that we don't have the latest version in-tree:
https://github.com/rust-lang/rust/blob/master/src/rt/miniz.c
https://github.com/richgel999/miniz/blob/master/miniz.c
adelarsq commentedon Apr 30, 2016
@alexcrichton Just to know. Any reason to avoid a update for the
miniz.c
file?alexcrichton commentedon Apr 30, 2016
Nah should be fine to update!
alexcrichton commentedon Apr 30, 2016
@bors: retry
On Fri, Apr 29, 2016 at 5:35 PM, Adelar da Silva Queiróz <
notifications@github.com> wrote:
dns2utf8 commentedon May 10, 2016
I updated the miniz.c locally, but it did not compile with gcc 6.1.1.
I am compiling with clang 3.7.1 now with the updated file, works so far.
MagaTailor commentedon May 10, 2016
No problem on ARM using gcc 6.1.0, go figure. And I didn't pass
-Wno-error
anywhere.Edit:
No wait, gcc was bootstrapped with
--disable-werror
dns2utf8 commentedon May 10, 2016
I was able to build the compiler and the docs with clang and I opened a issue on richgel999/miniz#51.
MagaTailor commentedon May 10, 2016
Likewise with gcc, just add
-Wno-error
to your CFLAGS for now.SimonSapin commentedon May 20, 2016
This fixes the build for me with GCC 6.1.1.
dns2utf8 commentedon May 27, 2016
There is a PR addressing this: #33798
dns2utf8 commentedon May 27, 2016
And I made a PR to upstream: richgel999/miniz#52
Maybe upgrade miniz after it is merged.
Regards
tbu- commentedon May 30, 2016
Fixed by #33798.
Keruspe commentedon May 30, 2016
There's still another compilation failure with gcc 6 here
steveklabnik commentedon Oct 31, 2018
We have since removed
hoedown
as well. Is anyone still seeing this issue? I believe it can be closed.