[Rpm-maint] [rpm-software-management/rpm] Use int64_t for lengths (#1492)
Panu Matilainen
notifications at github.com
Thu Feb 18 09:49:21 UTC 2021
All these casts are making my skin crawl. My golden rule is that needing a cast is a warning sign that says to look for another way. I'm in a bit of denial over the need to cast to int64 to ensure the calculation occurs at the target variable type - are our "smart" optimizing compilers *really* that dumb? I get the need for such a cast in eg anonymous conditional context, but not when the target variable type is well known such as here.
Also the cast on the return is unnecessary, the compiler will do the right thing without our help so let it. The INT_MAX check makes the point clear enough.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1492#issuecomment-781221141
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210218/553e7049/attachment.html>
More information about the Rpm-maint
mailing list