drivers: Add 'U' to unsigned variable assignments

Add 'U' to a value when assigning it to an unsigned variable.
MISRA-C rule 7.2

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This commit is contained in:
Patrik Flykt 2018-11-29 11:12:22 -08:00 committed by Anas Nashif
commit 8ff96b5a57
172 changed files with 693 additions and 693 deletions

View file

@ -111,7 +111,7 @@ static u8_t pwm_led_esp32_get_gpio_config(u8_t pin,
{
u8_t i;
for (i = 0; i < 16; i++) {
for (i = 0U; i < 16; i++) {
if (ch_cfg[i].gpio == pin) {
return i;
}
@ -180,10 +180,10 @@ static void pwm_led_esp32_duty_set(int speed_mode, int channel, int duty_val)
{
union pwm_led_esp32_duty duty;
duty.start = 0;
duty.direction = 1;
duty.cycle = 1;
duty.scale = 0;
duty.start = 0U;
duty.direction = 1U;
duty.cycle = 1U;
duty.scale = 0U;
pwm_led_esp32_duty_config(speed_mode, channel, duty_val << 4, duty);
}