From: Adam C. Emerson Date: Wed, 9 May 2018 01:25:28 +0000 (-0400) Subject: test/rbd/fsx: Disable overflow-format warning X-Git-Tag: v13.2.0~37^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c82d5da1623a74a29fa1ab2c9fb5d9780df653d3;p=ceph.git test/rbd/fsx: Disable overflow-format warning No return type or other way to react to it. Signed-off-by: Adam C. Emerson (cherry picked from commit ff189df08fc7250dfcc334502598cfbc4d2d4cb7) --- diff --git a/src/test/librbd/fsx.cc b/src/test/librbd/fsx.cc index aa283af43ba..bc6fd526adb 100644 --- a/src/test/librbd/fsx.cc +++ b/src/test/librbd/fsx.cc @@ -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)