[PATCH 2/2] erofs-utils: lib: fix an API usage error

Gao Xiang hsiangkao at linux.alibaba.com
Mon Feb 17 13:49:29 AEDT 2025


  CID 541574:  API usage errors  (PRINTF_ARGS)
  Argument "rc" to format specifier "%d" was expected to have type "int" but has type "long".

Coverity-id: 541574
Signed-off-by: Gao Xiang <hsiangkao at linux.alibaba.com>
---
 lib/fragments.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fragments.c b/lib/fragments.c
index e22b773..2f5fbf9 100644
--- a/lib/fragments.c
+++ b/lib/fragments.c
@@ -271,7 +271,7 @@ out:
 	if (rc)
 		erofs_err("Failed to record %llu-byte fragment data @ %llu for nid %llu: %d",
 			  inode->fragment_size | 0ULL,
-			  inode->fragmentoff | 0ULL, inode->nid | 0ULL, rc);
+			  inode->fragmentoff | 0ULL, inode->nid | 0ULL, (int)rc);
 	if (memblock)
 		munmap(memblock, inode->i_size);
 	return rc;
-- 
2.43.5



More information about the Linux-erofs mailing list