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

Flag possible divisions by zero #57268

Open
filiph opened this issue Feb 16, 2016 · 0 comments
Open

Flag possible divisions by zero #57268

filiph opened this issue Feb 16, 2016 · 0 comments
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. linter-lint-request P4 type-enhancement A request for a change that isn't a bug

Comments

@filiph
Copy link
Contributor

filiph commented Feb 16, 2016

int getTypeSize(ValueType type) {
  switch (type) {
    ....
    default: return 0;
  }
}

void loadProperty(int offset, ValueType unboxedType, ....) {
  int index = offset ~/ getTypeSize(unboxedType);
  ....
}
@pq pq added type-enhancement A request for a change that isn't a bug linter-lint-request labels Feb 17, 2016
@srawlins srawlins added the P4 label Oct 11, 2022
@devoncarew devoncarew added analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Nov 18, 2024
@devoncarew devoncarew transferred this issue from dart-lang/linter Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. linter-lint-request P4 type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants