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

@ -124,7 +124,7 @@ static int uart_imx_fifo_fill(struct device *dev, const u8_t *tx_data,
int size)
{
UART_Type *uart = UART_STRUCT(dev);
unsigned int num_tx = 0;
unsigned int num_tx = 0U;
while (((size - num_tx) > 0) &&
UART_GetStatusFlag(uart, uartStatusTxReady)) {
@ -140,7 +140,7 @@ static int uart_imx_fifo_read(struct device *dev, u8_t *rx_data,
const int size)
{
UART_Type *uart = UART_STRUCT(dev);
unsigned int num_rx = 0;
unsigned int num_rx = 0U;
while (((size - num_rx) > 0) &&
UART_GetStatusFlag(uart, uartStatusRxReady)) {