drivers/mtd/mtd_partition.c: Fix printf format warnings

This commit is contained in:
YAMAMOTO Takashi 2020-11-11 16:11:39 +09:00 committed by Xiang Xiao
parent 3b9e72c898
commit 565a67262b

View File

@ -629,14 +629,15 @@ static ssize_t part_procfs_read(FAR struct file *filep, FAR char *buffer,
/* Terminate the partition name and add to output buffer */
ret = snprintf(&buffer[total], buflen - total, "%s%7d %7d %s\n",
partname, attr->nextpart->firstblock / blkpererase,
attr->nextpart->neraseblocks,
ret = snprintf(&buffer[total], buflen - total, "%s%7ju %ju %s\n",
partname,
(uintmax_t)attr->nextpart->firstblock / blkpererase,
(uintmax_t)attr->nextpart->neraseblocks,
attr->nextpart->parent->name);
#else
ret = snprintf(&buffer[total], buflen - total, "%7d %7d %s\n",
attr->nextpart->firstblock / blkpererase,
attr->nextpart->neraseblocks,
ret = snprintf(&buffer[total], buflen - total, "%7ju %7ju %s\n",
(uintmax_t)attr->nextpart->firstblock / blkpererase,
(uintmax_t)attr->nextpart->neraseblocks,
attr->nextpart->parent->name);
#endif