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

@ -83,7 +83,7 @@ static int mcux_lpuart_fifo_fill(struct device *dev, const u8_t *tx_data,
int len)
{
const struct mcux_lpuart_config *config = dev->config->config_info;
u8_t num_tx = 0;
u8_t num_tx = 0U;
while ((len - num_tx > 0) &&
(LPUART_GetStatusFlags(config->base)
@ -99,7 +99,7 @@ static int mcux_lpuart_fifo_read(struct device *dev, u8_t *rx_data,
const int len)
{
const struct mcux_lpuart_config *config = dev->config->config_info;
u8_t num_rx = 0;
u8_t num_rx = 0U;
while ((len - num_rx > 0) &&
(LPUART_GetStatusFlags(config->base)