Skip to content

Surround the statement if switch-case block contains declarations.#1285

Merged
bors-servo merged 1 commit intoservo:masterfrom
mephisto41:bracket-for-switch-case
May 23, 2017
Merged

Surround the statement if switch-case block contains declarations.#1285
bors-servo merged 1 commit intoservo:masterfrom
mephisto41:bracket-for-switch-case

Conversation

@mephisto41
Copy link
Copy Markdown
Contributor

@mephisto41 mephisto41 commented May 23, 2017

This fix #1206 .


This change is Reviewable

@nical
Copy link
Copy Markdown
Contributor

nical commented May 23, 2017

It would be great to add this to the list of driver issues, even if this is not strictly coming from a driver. Or remind me to do it when I come back from vacation next week.


switch (int(style)) {
case BORDER_STYLE_GROOVE:
{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see declarations in these switch cases. Are they also a problem?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forget to explain this case. See 1, ANGLE will translate ternary operator to type s; if(b) s = x; else s = y;. And type s is a declaration.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omg, that's somewhat obscure
thanks for clarification!

@kvark
Copy link
Copy Markdown
Member

kvark commented May 23, 2017

I'll add it to the wiki.
Thanks for the fix!
@bors-servo r+

@bors-servo
Copy link
Copy Markdown
Contributor

📌 Commit 2f850a0 has been approved by kvark

@kvark
Copy link
Copy Markdown
Member

kvark commented May 23, 2017

see https://github.com/servo/webrender/wiki/Driver-issues#1285---declarations-in-switch-cases

@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit 2f850a0 with merge 42c0436...

bors-servo pushed a commit that referenced this pull request May 23, 2017
Surround the statement if switch-case block contains declarations.

This fix #1206 .

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1285)
<!-- Reviewable:end -->
@bors-servo
Copy link
Copy Markdown
Contributor

☀️ Test successful - status-travis
Approved by: kvark
Pushing 42c0436 to master...

@bors-servo bors-servo merged commit 2f850a0 into servo:master May 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shader compilation error on some windows hardware

4 participants