diff --git a/testing/fstest/fstest_main.c b/testing/fstest/fstest_main.c index 13ac6f627..488b4e128 100644 --- a/testing/fstest/fstest_main.c +++ b/testing/fstest/fstest_main.c @@ -386,7 +386,7 @@ static inline int fstest_wrfile(FAR struct fstest_filedesc_s *file) { printf("ERROR: Failed to open file for writing: %d\n", errno); printf(" File name: %s\n", file->name); - printf(" File size: %d\n", file->len); + printf(" File size: %zd\n", file->len); } fstest_freefile(file); @@ -427,7 +427,7 @@ static inline int fstest_wrfile(FAR struct fstest_filedesc_s *file) { printf("ERROR: Failed to write file: %d\n", errcode); printf(" File name: %s\n", file->name); - printf(" File size: %d\n", file->len); + printf(" File size: %zd\n", file->len); printf(" Write offset: %ld\n", (long)offset); printf(" Write size: %ld\n", (long)nbytestowrite); } @@ -455,7 +455,7 @@ static inline int fstest_wrfile(FAR struct fstest_filedesc_s *file) { printf("ERROR: Partial write:\n"); printf(" File name: %s\n", file->name); - printf(" File size: %d\n", file->len); + printf(" File size: %zd\n", file->len); printf(" Write offset: %ld\n", (long)offset); printf(" Write size: %ld\n", (long)nbytestowrite); printf(" Written: %ld\n", (long)nbyteswritten); @@ -541,7 +541,7 @@ static ssize_t fstest_rdblock(int fd, FAR struct fstest_filedesc_s *file, { printf("ERROR: Failed to read file: %d\n", errno); printf(" File name: %s\n", file->name); - printf(" File size: %d\n", file->len); + printf(" File size: %zd\n", file->len); printf(" Read offset: %ld\n", (long)offset); printf(" Read size: %ld\n", (long)len); return ERROR; @@ -552,7 +552,7 @@ static ssize_t fstest_rdblock(int fd, FAR struct fstest_filedesc_s *file, #if 0 /* No... we do this on purpose sometimes */ printf("ERROR: Unexpected end-of-file:\n"); printf(" File name: %s\n", file->name); - printf(" File size: %d\n", file->len); + printf(" File size: %zd\n", file->len); printf(" Read offset: %ld\n", (long)offset); printf(" Read size: %ld\n", (long)len); #endif @@ -562,7 +562,7 @@ static ssize_t fstest_rdblock(int fd, FAR struct fstest_filedesc_s *file, { printf("ERROR: Partial read:\n"); printf(" File name: %s\n", file->name); - printf(" File size: %d\n", file->len); + printf(" File size: %zd\n", file->len); printf(" Read offset: %ld\n", (long)offset); printf(" Read size: %ld\n", (long)len); printf(" Bytes read: %ld\n", (long)nbytesread); @@ -592,7 +592,7 @@ static inline int fstest_rdfile(FAR struct fstest_filedesc_s *file) { printf("ERROR: Failed to open file for reading: %d\n", errno); printf(" File name: %s\n", file->name); - printf(" File size: %d\n", file->len); + printf(" File size: %zd\n", file->len); } return ERROR; @@ -622,7 +622,7 @@ static inline int fstest_rdfile(FAR struct fstest_filedesc_s *file) { printf("ERROR: Bad CRC: %d vs %d\n", crc, file->crc); printf(" File name: %s\n", file->name); - printf(" File size: %d\n", file->len); + printf(" File size: %zd\n", file->len); close(fd); return ERROR; } @@ -634,7 +634,7 @@ static inline int fstest_rdfile(FAR struct fstest_filedesc_s *file) { printf("ERROR: Read past the end of file\n"); printf(" File name: %s\n", file->name); - printf(" File size: %d\n", file->len); + printf(" File size: %zd\n", file->len); printf(" Bytes read: %ld\n", (long)nbytesread); close(fd); return ERROR; @@ -723,7 +723,7 @@ static int fstest_verifyfs(void) { printf("ERROR: Failed to read a file: %d\n", i); printf(" File name: %s\n", file->name); - printf(" File size: %d\n", file->len); + printf(" File size: %zd\n", file->len); return ERROR; } } @@ -734,7 +734,7 @@ static int fstest_verifyfs(void) #if CONFIG_TESTING_FSTEST_VERBOSE != 0 printf("ERROR: Successfully read a deleted file\n"); printf(" File name: %s\n", file->name); - printf(" File size: %d\n", file->len); + printf(" File size: %zd\n", file->len); #endif fstest_freefile(file); g_ndeleted--; @@ -807,7 +807,7 @@ static int fstest_delfiles(void) { printf("ERROR: Unlink %d failed: %d\n", i + 1, errno); printf(" File name: %s\n", file->name); - printf(" File size: %d\n", file->len); + printf(" File size: %zd\n", file->len); printf(" File index: %d\n", j); /* If we don't do this we can get stuck in an infinite @@ -859,7 +859,7 @@ static int fstest_delallfiles(void) { printf("ERROR: Unlink %d failed: %d\n", i + 1, errno); printf(" File name: %s\n", file->name); - printf(" File size: %d\n", file->len); + printf(" File size: %zd\n", file->len); printf(" File index: %d\n", i); } else