]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_io: fix gcc-7 related printf warnings
authorDave Chinner <dchinner@redhat.com>
Wed, 6 Dec 2017 15:17:07 +0000 (09:17 -0600)
committerEric Sandeen <sandeen@redhat.com>
Wed, 6 Dec 2017 15:17:07 +0000 (09:17 -0600)
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>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
io/fsmap.c

index 448fb5356466b0de5fb865b014205b4fa7edd8a6..e46fdbaa148c068699a03b1b651302234ba1b6ce 100644 (file)
@@ -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;