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

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


The following commit(s) were added to refs/heads/master by this push:
     new c8d683ce7a fs/nxffs: Fix syslog formats compile error
c8d683ce7a is described below

commit c8d683ce7ab874d61c1e469fed3b97102ae1334e
Author: Leo Chung <[email protected]>
AuthorDate: Mon Oct 21 17:22:49 2024 +0800

    fs/nxffs: Fix syslog formats compile error
    
    If CONFIG_FS_LARGEFILE is enabled, the off_t is 64bit.
    So use PRIiOFF instead of PRIi32.
    
    Signed-off-by: Leo Chung <[email protected]>
---
 fs/nxffs/nxffs_dump.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nxffs/nxffs_dump.c b/fs/nxffs/nxffs_dump.c
index e5f8a353b8..db074f4d5b 100644
--- a/fs/nxffs/nxffs_dump.c
+++ b/fs/nxffs/nxffs_dump.c
@@ -62,7 +62,7 @@ struct nxffs_blkinfo_s
 
 #if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_FS)
 static const char g_hdrformat[] = "  BLOCK:OFFS  TYPE  STATE   LENGTH\n";
-static const char g_format[]    = "  %5"PRIi32":%-5d %s %s %5"PRIu32"\n";
+static const char g_format[]    = "  %5"PRIiOFF":%-5d %s %s %5"PRIu32"\n";
 #endif
 
 /****************************************************************************
@@ -492,7 +492,7 @@ int nxffs_dump(FAR struct mtd_dev_s *mtd, bool verbose)
         }
     }
 
-  syslog(LOG_NOTICE, "%" PRIi32 " blocks analyzed\n", blkinfo.nblocks);
+  syslog(LOG_NOTICE, "%" PRIiOFF " blocks analyzed\n", blkinfo.nblocks);
 
   fs_heap_free(blkinfo.buffer);
   return OK;

Reply via email to