sama5/at25_main: fix direct use of nput, convert to int

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
buxiasen 2024-11-14 18:59:03 +08:00 • committed by Xiang Xiao
parent a5459cdaca
commit f53f0ecf0e

View file

@ -182,7 +182,7 @@ int at25_main(int argc, char *argv[])
/* The HEX file load was successful, write the data to FLASH */
printf("Successfully loaded the Intel HEX file into memory...\n");
printf(" Writing %d bytes to the AT25 Serial FLASH\n",
printf(" Writing %" PRIdOFF " bytes to the AT25 Serial FLASH\n",
memoutstream.common.nput);
remaining = memoutstream.common.nput;
@ -215,7 +215,7 @@ int at25_main(int argc, char *argv[])
* the same.
*/
printf(" Verifying %d bytes in the AT25 Serial FLASH\n",
printf(" Verifying %" PRIdOFF " bytes in the AT25 Serial FLASH\n",
memoutstream.common.nput);
/* Open the AT25 device for writing */
@ -254,7 +254,7 @@ int at25_main(int argc, char *argv[])
{
if (memcmp(g_iobuffer, src, nread) != 0)
{
fprintf(stderr, "ERROR: Verify failed at offset %d\n",
fprintf(stderr, "ERROR: Verify failed at offset %"PRIdOFF"\n",
memoutstream.common.nput - remaining);
close(fd);
return EXIT_FAILURE;
@ -266,7 +266,7 @@ int at25_main(int argc, char *argv[])
}
while (remaining > 0);
printf(" Successfully verified %d bytes in the AT25 Serial FLASH\n",
printf("Successfully verified %"PRIdOFF" bytes in the AT25 Serial FLASH\n",
memoutstream.common.nput);
close(fd);