This is an automated email from the ASF dual-hosted git repository.

raiden00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit cf1d5bb08b5b2a4f86621d52336c6ad7a3f482b7
Author: Tiago Medicci <tiago.medi...@espressif.com>
AuthorDate: Fri Mar 28 16:35:48 2025 -0300

    benchmarks/mtd: use `PRIxxx` macro to improve portability
    
    To improve portability, use `PRIxxx` macro instead of int/long int
    format specifiers.
    
    Signed-off-by: Tiago Medicci <tiago.medi...@espressif.com>
---
 benchmarks/mtd/Kconfig | 3 +--
 benchmarks/mtd/mtd.c   | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/benchmarks/mtd/Kconfig b/benchmarks/mtd/Kconfig
index 717bd5b20..0628e7835 100644
--- a/benchmarks/mtd/Kconfig
+++ b/benchmarks/mtd/Kconfig
@@ -6,8 +6,7 @@
 config BENCHMARK_MTD
        tristate "MTD test and transfer rate benchmark"
        default n
-       depends on BUILD_FLAT && MTD
-       select LIBC_FLOATINGPOINT
+       depends on BUILD_FLAT && MTD && LIBC_FLOATINGPOINT
        ---help---
                This testing/benchmark application performs an erase/write
                operation to evaluate write transfer rate and then reads the
diff --git a/benchmarks/mtd/mtd.c b/benchmarks/mtd/mtd.c
index 4d117c606..475fd1c66 100644
--- a/benchmarks/mtd/mtd.c
+++ b/benchmarks/mtd/mtd.c
@@ -95,7 +95,7 @@ int main(int argc, FAR char *argv[])
   ret = inode->u.i_bops->ioctl(inode, MTDIOC_GEOMETRY, (unsigned long) &geo);
   if (ret != OK)
     {
-      fprintf(stderr, "Device is not a MTD device\n");
+      fprintf(stderr, "Device is not a MTD device");
       goto errout_with_driver;
     }
 
@@ -104,7 +104,7 @@ int main(int argc, FAR char *argv[])
   printf("FLASH device parameters:\n");
   printf("   Sector size:  %10d\n", info.sectorsize);
   printf("   Sector count: %10d\n", info.numsectors);
-  printf("   Erase block:  %10d\n", geo.erasesize);
+  printf("   Erase block:  %10" PRIx32 "\n", geo.erasesize);
   printf("   Total size:   %10d\n", info.sectorsize * info.numsectors);
 
   if (info.sectorsize != geo.erasesize)

Reply via email to