From ff189df08fc7250dfcc334502598cfbc4d2d4cb7 Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Tue, 8 May 2018 21:25:28 -0400 Subject: [PATCH] test/rbd/fsx: Disable overflow-format warning No return type or other way to react to it. Signed-off-by: Adam C. Emerson --- src/test/librbd/fsx.cc | 7 +++++++ 1 file changed, 7 insertions(+) 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) -- 2.47.3