Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set false locale #5293

Merged
merged 2 commits into from
Nov 19, 2020
Merged

Set false locale #5293

merged 2 commits into from
Nov 19, 2020

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Nov 19, 2020

Addressing a bug and a warning mentioned in #5289.
Namely:

Bug:
-line 69736: Suspicious code. This code lacks side-effects. Is there a bug?
if(!locale) locale === 'en-US';
-line 69736: Suspicious code. The result of the 'sheq' operator is not being used.
if(!locale) locale === 'en-US';
Shouldn't it be if(!locale) locale = 'en-US'; instead?

Warning:
-line 87184: unreachable code
for(i = 0; i < traces.length; i++) {
Since this for loop contains a break; that cannot be avoided, is it relevant to use a for loop to only do things with i==0 while i < traces.length?

@plotly/plotly_js

@archmoj archmoj added bug something broken status: reviewable labels Nov 19, 2020
Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃 Nice! And thanks for catching these @COLLINETTEBastien 🎉

@archmoj archmoj merged commit aa6f442 into master Nov 19, 2020
@archmoj archmoj deleted the fix5289-gcc branch November 19, 2020 21:48
@archmoj archmoj added this to the v1.58.0 milestone Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants