linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfs_io: fix gcc-7 related printf warnings
@ 2017-11-10  1:39 Dave Chinner
  2017-11-10  1:43 ` Eric Sandeen
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Chinner @ 2017-11-10  1:39 UTC (permalink / raw)
  To: linux-xfs

From: Dave Chinner <dchinner@redhat.com>

New compiler, new checks, new warnings.

Fix the new [-Wformat-truncation=] warnings that io/fsmap.c is
throwing w/ gcc-7.2 because "%lld..%lld" requires a buffer 40
characters long, not 32.

Signed-Off-By: Dave Chinner <dchinner@redhat.com>
---
 io/fsmap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/io/fsmap.c b/io/fsmap.c
index 448fb5356466..e46fdbaa148c 100644
--- a/io/fsmap.c
+++ b/io/fsmap.c
@@ -184,8 +184,8 @@ dump_map_verbose(
 	off64_t			agoff, bperag;
 	int			foff_w, boff_w, aoff_w, tot_w, agno_w, own_w;
 	int			nr_w, dev_w;
-	char			rbuf[32], bbuf[32], abuf[32], obuf[32];
-	char			nbuf[32], dbuf[32], gbuf[32];
+	char			rbuf[40], bbuf[40], abuf[40], obuf[40];
+	char			nbuf[40], dbuf[40], gbuf[40];
 	char			owner[OWNER_BUF_SZ];
 	int			sunit, swidth;
 	int			flg = 0;
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-10  3:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-10  1:39 [PATCH] xfs_io: fix gcc-7 related printf warnings Dave Chinner
2017-11-10  1:43 ` Eric Sandeen
2017-11-10  3:21   ` Darrick J. Wong
2017-11-10  3:27     ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).