]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/rbd/fsx: Disable overflow-format warning
authorAdam C. Emerson <aemerson@redhat.com>
Wed, 9 May 2018 01:25:28 +0000 (21:25 -0400)
committerNathan Cutler <ncutler@suse.com>
Fri, 18 May 2018 13:30:35 +0000 (15:30 +0200)
No return type or other way to react to it.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit ff189df08fc7250dfcc334502598cfbc4d2d4cb7)

src/test/librbd/fsx.cc

index aa283af43ba74537c7fbd21f2d2f496e51659ff1..bc6fd526adb08bb2d6a2fa02ada039645d8bb0c8 100644 (file)
@@ -2398,8 +2398,15 @@ docompareandwrite(unsigned offset, unsigned size)
 
 void clone_filename(char *buf, size_t len, int clones)
 {
+#if __GNUC__ && __GNUC__ >= 8
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-truncation"
+#endif
        snprintf(buf, len, "%s/fsx-%s-parent%d",
                 dirpath, iname, clones);
+#if __GNUC__ && __GNUC__ >= 8
+#pragma GCC diagnostic pop
+#endif
 }
 
 void clone_imagename(char *buf, size_t len, int clones)