Merge bitcoin-core/gui#806: refactor: Misc int sign change fixes
05416422d3refactor: Avoid implicit-integer-sign-change in processNewTransaction (MarcoFalke)321f105d08refactor: Avoid implicit-signed-integer-truncation-or-sign-change in FreedesktopImage (MarcoFalke)6d8eecd33arefactor: Avoid implicit-integer-sign-change in createTransaction (MarcoFalke) Pull request description: This is allowed by the language. However, the `integer` sanitizer complains about it. Thus, fix it, so that the `integer` sanitizer can be used in the future to catch unintended sign changes. Fixes #805. ACKs for top commit: pablomartin4btc: tACK05416422d3hebasto: ACK05416422d3, I have reviewed the code and it looks OK. Tree-SHA512: eaa941479bd7bee196eb8b31d93b8e1db122410cf62e8ec4cbbec35cfd14cc766081c3df5dd14a228e21ad2678d8b8ba0d2649e5934c994a90ae96d8b264b4ce
This commit is contained in:
3 files changed
+6
-6
No files matched your search
@@ -286,7 +286,7 @@ public:
|
||||
if (!res) return util::Error{util::ErrorString(res)};
|
||||
const auto& txr = *res;
|
||||
fee = txr.fee;
|
||||
change_pos = txr.change_pos ? *txr.change_pos : -1;
|
||||
change_pos = txr.change_pos ? int(*txr.change_pos) : -1;
|
||||
|
||||
return txr.tx;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user