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

Fix some prefast warnings #12936

Merged
merged 2 commits into from
Sep 13, 2022
Merged

Fix some prefast warnings #12936

merged 2 commits into from
Sep 13, 2022

Conversation

hariharans29
Copy link
Member

As title

@@ -80,7 +80,7 @@ struct BinaryElementwisePreparation {
auto offset = out_rank - lhs_rank;
for (auto i = offset; i < out_rank; ++i) {
// the stride for broadcast dimension is kept as 0
if (lhs_shape.GetDims()[i - offset] != 1) {
if (lhs_shape.GetDims()[static_cast<size_t>(i) - offset] != 1) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Arithmetic overflow warning

@hariharans29 hariharans29 requested a review from snnn September 13, 2022 00:07
@hariharans29 hariharans29 merged commit 9edc946 into main Sep 13, 2022
@hariharans29 hariharans29 deleted the hari/fix_scan_warnings branch September 13, 2022 20:04
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