Skip to content
This repository was archived by the owner on Oct 9, 2018. It is now read-only.

document.c: fix trigger of -Werror=misleading-indentation #6

Merged
merged 1 commit into from
May 31, 2016

Conversation

intelfx
Copy link

@intelfx intelfx commented May 31, 2016

gcc 6.1.1 triggers a warning here, which breaks git rust build.
There is no actual bug, because the "if" branch exits the loop, but if it wasn't so, it'd be a bug.

/tmp/makepkg/build/rust-git/src/rust/src/rt/hoedown/src/document.c: In function 'char_link':
/tmp/makepkg/build/rust-git/src/rust/src/rt/hoedown/src/document.c:1161:5: error: this 'else' clause does not guard... [-Werror=misleading-indentation]
     else nb_p--; i++;
     ^~~~
/tmp/makepkg/build/rust-git/src/rust/src/rt/hoedown/src/document.c:1161:18: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else'
     else nb_p--; i++;

This PR is same as #5 but against different branch, as requested by @alexcrichton.

gcc 6.1.1 triggers a warning here, which breaks git rust build.
There is no actual bug, because the "if" branch exits the loop, but if it wasn't so, it'd be a bug.

```
/tmp/makepkg/build/rust-git/src/rust/src/rt/hoedown/src/document.c: In function 'char_link':
/tmp/makepkg/build/rust-git/src/rust/src/rt/hoedown/src/document.c:1161:5: error: this 'else' clause does not guard... [-Werror=misleading-indentation]
     else nb_p--; i++;
     ^~~~
/tmp/makepkg/build/rust-git/src/rust/src/rt/hoedown/src/document.c:1161:18: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else'
     else nb_p--; i++;
```
@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive
Copy link

warning Warning warning

  • Pull requests are usually filed against the master branch for this repo, but this one is against rust-2015-09-21-do-not-delete. Please double check that you specified the right target!

@alexcrichton alexcrichton merged commit a3736a0 into rust-lang:rust-2015-09-21-do-not-delete May 31, 2016
@alexcrichton
Copy link
Member

Thanks!

@intelfx
Copy link
Author

intelfx commented May 31, 2016

I guess this should also be merged to master?

@alexcrichton
Copy link
Member

Nah our submodule is pointed at this branch so it'll just need to be updated now. We don't maintain the master branch, we just maintain a snapshot of all our submodule branches in this repo.

@intelfx
Copy link
Author

intelfx commented May 31, 2016

@alexcrichton
Copy link
Member

Yes, you don't need to specify branch in the gitmodules to actually use it, for example the llvm submodule is misconfigured to use master but apparently everything works!

@intelfx
Copy link
Author

intelfx commented May 31, 2016

Ah, shame on me, I've forgotten how submodules work. Then the submodule pointer must be updated in rust-lang/rust to point to the new commit, correct?

@intelfx intelfx deleted the patch-1 branch May 31, 2016 18:25
@alexcrichton
Copy link
Member

Yeah you'll just cd into it and git reset --hard to the relevant commit, and then commit that change itself.

@intelfx
Copy link
Author

intelfx commented May 31, 2016

So I now do another PR against rust, right?

// the code/communication ratio for this PR isn't even a denormal double.

@alexcrichton
Copy link
Member

Indeed, that should do it!

bors added a commit to rust-lang/rust that referenced this pull request Jun 2, 2016
hoedown: fix trigger of -Werror=misleading-indentation

See rust-lang/hoedown#6.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants