mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
pkg/ucglib/src/csrc/ucg_riotos.c: fix cpp.check shiftTooManyBitsSigned
This commit is contained in:
parent
cf3d584678
commit
cc2c3a0163
@ -53,7 +53,7 @@ static void ucg_enable_pins(gpio_t *pins, uint32_t pins_enabled)
|
||||
uint8_t i;
|
||||
|
||||
for (i = 0; i < 32; i++) {
|
||||
if (pins_enabled & (1 << i)) {
|
||||
if (pins_enabled & ((uint32_t)1 << i)) {
|
||||
if (pins[i] != GPIO_UNDEF) {
|
||||
if (i < UCG_PIN_COUNT) {
|
||||
gpio_init(pins[i], GPIO_OUT);
|
||||
|
@ -184,7 +184,7 @@ int fortuna_random_data(fortuna_state_t *state, uint8_t *out, size_t bytes)
|
||||
size_t len = 0;
|
||||
|
||||
for (int i = 0; i < (int) FORTUNA_POOLS; i++) {
|
||||
if (state->reseeds | (1 << i)) {
|
||||
if (state->reseeds | ((uint32_t)1 << i)) {
|
||||
sha256_final(&state->pools[i].ctx, &buf[len]);
|
||||
sha256_init(&state->pools[i].ctx);
|
||||
state->pools[i].len = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user