misra-c: Add 'U' to unsigned variable assignments in subsys/

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:23:03 -08:00 committed by Anas Nashif
commit b97db52de7
139 changed files with 1198 additions and 1198 deletions

View file

@ -102,7 +102,7 @@ static int read_copy_flash_block(off_t start_addr, u32_t size,
{
off_t fl_addr;
u32_t num_read;
u32_t offset = 0;
u32_t offset = 0U;
/* adjust offset if starting address is not erase-aligned address */
if (start_addr & (CONFIG_DISK_FLASH_ERASE_ALIGNMENT - 1)) {

View file

@ -73,7 +73,7 @@ static int disk_ram_access_ioctl(struct disk_info *disk, u8_t cmd, void *buff)
*(u32_t *)buff = RAMDISK_SECTOR_SIZE;
break;
case DISK_IOCTL_GET_ERASE_BLOCK_SZ:
*(u32_t *)buff = 1;
*(u32_t *)buff = 1U;
break;
default:
return -EINVAL;