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:
parent
25e8e4d4e7
commit
8ff96b5a57
172 changed files with 693 additions and 693 deletions
|
@ -81,7 +81,7 @@ static int uart_stm32_fifo_fill(struct device *dev, const u8_t *tx_data,
|
|||
int size)
|
||||
{
|
||||
USART_TypeDef *UartInstance = UART_STRUCT(dev);
|
||||
u8_t num_tx = 0;
|
||||
u8_t num_tx = 0U;
|
||||
|
||||
while ((size - num_tx > 0) &&
|
||||
LL_USART_IsActiveFlag_TXE(UartInstance)) {
|
||||
|
@ -98,7 +98,7 @@ static int uart_stm32_fifo_read(struct device *dev, u8_t *rx_data,
|
|||
const int size)
|
||||
{
|
||||
USART_TypeDef *UartInstance = UART_STRUCT(dev);
|
||||
u8_t num_rx = 0;
|
||||
u8_t num_rx = 0U;
|
||||
|
||||
while ((size - num_rx > 0) &&
|
||||
LL_USART_IsActiveFlag_RXNE(UartInstance)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue