Skip to content

clang-tidy: clang-analyzer-core.DivideZero#7765

Merged
mattklein123 merged 1 commit intoenvoyproxy:masterfrom
derekargueta:dereka/clang-tidy-clang-analyzer-divide-zero
Jul 30, 2019
Merged

clang-tidy: clang-analyzer-core.DivideZero#7765
mattklein123 merged 1 commit intoenvoyproxy:masterfrom
derekargueta:dereka/clang-tidy-clang-analyzer-divide-zero

Conversation

@derekargueta
Copy link
Copy Markdown
Member

Description: clang-analyzer-core.DivideZero checks all possible codepaths for division by zero, for which we had one case. Fixed the existing case and enabled as an error to prevent regressions.
Risk Level: low
Testing: existing
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Derek Argueta dereka@pinterest.com

Signed-off-by: Derek Argueta <dereka@pinterest.com>
void JitteredBackOffStrategy::reset() { current_retry_ = 1; }

} // namespace Envoy No newline at end of file
} // namespace Envoy
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

an incidental change picked up by my vim settings, but leaving it in since we probably want all files to end with newline.

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.

It would be nice to make the formatter deal with this...

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thank you!

void JitteredBackOffStrategy::reset() { current_retry_ = 1; }

} // namespace Envoy No newline at end of file
} // namespace Envoy
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.

It would be nice to make the formatter deal with this...

@mattklein123 mattklein123 merged commit e1a33da into envoyproxy:master Jul 30, 2019
@derekargueta derekargueta deleted the dereka/clang-tidy-clang-analyzer-divide-zero branch October 8, 2019 09:15
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.

2 participants