diff mbox series

[2/4] debugfs: fix a -Wformat warning in dump_journal()

Message ID 20230128224651.59593-3-ebiggers@kernel.org
State Accepted
Headers show
Series e2fsprogs: a few more warning fixes | expand

Commit Message

Eric Biggers Jan. 28, 2023, 10:46 p.m. UTC
From: Eric Biggers <ebiggers@google.com>

This really should just use PRIi64, but e2fsprogs doesn't use the
inttypes.h format specifiers elsewhere, so just be consistent for now.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 debugfs/logdump.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Theodore Ts'o Jan. 30, 2023, 5:08 a.m. UTC | #1
On Sat, Jan 28, 2023 at 02:46:49PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> This really should just use PRIi64, but e2fsprogs doesn't use the
> inttypes.h format specifiers elsewhere, so just be consistent for now.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Thanks, I have this in my tree already (but I just hadn't pushed it
out yet; I wanted to get some other fixes done on the maint branch
before I merged maint with the master/next branches.)

       	 	      	       		   - Ted
diff mbox series

Patch

diff --git a/debugfs/logdump.c b/debugfs/logdump.c
index 036b50baf..938b48907 100644
--- a/debugfs/logdump.c
+++ b/debugfs/logdump.c
@@ -479,7 +479,8 @@  static void dump_journal(char *cmdname, FILE *out_file,
 
 		if ((blocknr == first_transaction_blocknr) &&
 		    (cur_counts != 0) && dump_old && (dump_counts != -1)) {
-			fprintf(out_file, "Dump all %lld journal records.\n", cur_counts);
+			fprintf(out_file, "Dump all %lld journal records.\n",
+				(long long)cur_counts);
 			break;
 		}