mtd/smartfs: Fix compilation warning

This commit is contained in:
Alan C. Assis 2021-08-09 17:48:00 -03:00 committed by Gustavo Henrique Nihei
parent 5820972727
commit c4742c2197
2 changed files with 7 additions and 6 deletions

View File

@ -579,7 +579,7 @@ static ssize_t part_procfs_read(FAR struct file *filep, FAR char *buffer,
MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&geo));
if (ret < 0)
{
ferr("ERROR: mtd->ioctl failed: %d\n", ret);
ferr("ERROR: mtd->ioctl failed: %zd\n", ret);
return 0;
}

View File

@ -856,7 +856,8 @@ static ssize_t smart_reload(struct smart_struct_s *dev, FAR uint8_t *buffer,
/* Read the full erase block into the buffer */
finfo("Read %d blocks starting at block %d\n", mtdblocks, mtdstartblock);
finfo("Read %zu blocks starting at block %zu\n",
mtdblocks, mtdstartblock);
nread = MTD_BREAD(dev->mtd, mtdstartblock, mtdblocks, buffer);
if (nread != mtdblocks)
{
@ -1408,7 +1409,7 @@ static ssize_t smart_bytewrite(FAR struct smart_struct_s *dev, size_t offset,
(FAR uint8_t *)dev->rwbuffer);
if (ret < 0)
{
ferr("ERROR: Error %d reading from device\n", -ret);
ferr("ERROR: Error %zd reading from device\n", -ret);
goto errout;
}
@ -1423,7 +1424,7 @@ static ssize_t smart_bytewrite(FAR struct smart_struct_s *dev, size_t offset,
(FAR uint8_t *) dev->rwbuffer);
if (ret < 0)
{
ferr("ERROR: Error %d writing to device\n", -ret);
ferr("ERROR: Error %zd writing to device\n", -ret);
goto errout;
}
}
@ -3213,7 +3214,7 @@ static inline int smart_llformat(FAR struct smart_struct_s *dev,
{
/* The block is not empty!! What to do? */
ferr("ERROR: Write block 0 failed: %d.\n", wrcount);
ferr("ERROR: Write block 0 failed: %zu.\n", wrcount);
/* Unlock the mutex if we add one */
@ -4560,7 +4561,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev,
/* Subtract dev->minwearlevel from all wear levels */
offset = dev->minwearlevel;
finfo("Reducing wear level bits by %d\n", offset);
finfo("Reducing wear level bits by %zu\n", offset);
for (x = 0; x < dev->geo.neraseblocks; x++)
{