commit | 723880e79fdda9f537a911f88983229d44006e0c | [log] [tgz] |
---|---|---|
author | Ben Lawson <benlawson@google.com> | Fri Jan 13 18:55:56 2023 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jan 13 18:55:56 2023 +0000 |
tree | e19e525caaa1b3e10c8315b723bb15134be88ed7 | |
parent | 858b99a34b69f577a83ecf8d91fcce2555d1c08f [diff] |
pw_random: Fix implicit conversions in RandomGenerator Fix implicit conversion from int to uint8_t in RandomGenerator::CountLeadingZeros. This conversion is safe because the __builtin_clz functions always return a positive value <= 64. This fixed compilation on Fuchsia. Test: pw watch Change-Id: Id7e29f80607e160c0315512aa9fca8da013cb90b Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/126510 Reviewed-by: Ali Zhang <alizhang@google.com> Commit-Queue: Ben Lawson <benlawson@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.