This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Fix implicitly narrow casting (NFC)
ClosedPublic

Authored by Chia-hungDuan on Oct 14 2022, 1:38 PM.

Details

Summary

u16 may be promoted to int by arithmetic type conversion. Do an explicit
cast to avoid certain compiler's warning. This fixes the problem
introduced by 0fb2aeef5310eaba2915b30810464a744a80da15

Diff Detail

Event Timeline

Chia-hungDuan created this revision.Oct 14 2022, 1:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 14 2022, 1:38 PM
Herald added a subscriber: Enna1. · View Herald Transcript
Chia-hungDuan requested review of this revision.Oct 14 2022, 1:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 14 2022, 1:38 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript

@Chia-hungDuan, I was experiencing similar problems building that @dyung was with your original patch. I was able to successfully build this patch in my environment, though. If @kamaub is happy with it, I think you're good to go.

@Chia-hungDuan, I was experiencing similar problems building that @dyung was with your original patch. I was able to successfully build this patch in my environment, though. If @kamaub is happy with it, I think you're good to go.

Thanks! I'll wait for @kamaub's approval.

dyung added a comment.Oct 14 2022, 2:17 PM

Just wanted to add that I was also able to successfully build with this patch.

Just wanted to add that I was also able to successfully build with this patch.

Thank you @dyung!

@Chia-hungDuan, I cannot currently build my product. Merging this patch will solve that problem. Of course, it's possible that after merging, @kamaub will still have intermittent test failures in his product, but at least he'll be able to build his product so that he can analyze his problems.

Thus, I urge you to merge this patch, which I've already verified will fix the build problems.

@Chia-hungDuan, I cannot currently build my product. Merging this patch will solve that problem. Of course, it's possible that after merging, @kamaub will still have intermittent test failures in his product, but at least he'll be able to build his product so that he can analyze his problems.

Thus, I urge you to merge this patch, which I've already verified will fix the build problems.

Ok, let me do it now

This revision was not accepted when it landed; it landed in state Needs Review.Oct 14 2022, 8:55 PM
This revision was automatically updated to reflect the committed changes.