practicalswift
commented at 3:17 PM on March 23, 2018:
contributor
Use explicit casting in cuckoocache's compute_hashes(...) to clarify integer conversion.
I discussed this code with the code's author @JeremyRubin who suggested patching it to avoid any confusion.
At least one static analyzer incorrectly warns about a shift past bitwidth (UB) here, so this patch will help avoid confusion for human reviewers and static analyzers alike :-)
fanquake added the label Refactoring on Mar 23, 2018
donaloconnor approved
donaloconnor
commented at 8:41 PM on March 23, 2018:
contributor
@MarcoFalke I think it's fine to do this even if it is technically a linter bug. It took me a few minutes to read specs of operators, integer conversion hierarchies, and such to be sure that the behavior was correct.
Use explicit casting in cuckoocache's compute_hashes(...) to clarify integer conversion9142dfea81
practicalswift force-pushed on Mar 26, 2018
practicalswift
commented at 10:38 PM on March 26, 2018:
contributor
Updated: Now applying the cast as @JeremyRubin suggested.
Please re-review :-)
MarcoFalke
commented at 10:38 PM on April 1, 2018:
member
utACK9142dfea8181c6649c8d6a8775d53bc3e14de847
practicalswift
commented at 8:22 PM on April 2, 2018:
contributor
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-04-16 15:15 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me