X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fcommon%2Fcommon.c;h=85920c10b4525de2b96e66b0243a7c915c18882f;hp=048e3d27ce4001ca6a6c443239106b7d6764095c;hb=900eef7317d3e8b350a93fb8782639845c62c2bd;hpb=25a74feac6681e831f748723353a46ce48155dda diff --git a/src/common/common.c b/src/common/common.c index 048e3d27..85920c10 100644 --- a/src/common/common.c +++ b/src/common/common.c @@ -1454,8 +1454,11 @@ size_t bt_common_get_page_size(int log_level) size_t _tmp_fmt_size = (size_t) (fmt_ch - *out_fmt_ch); \ strncpy(_tmp_fmt, *out_fmt_ch, _tmp_fmt_size); \ _tmp_fmt[_tmp_fmt_size] = '\0'; \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"") \ _count = snprintf(*buf_ch, _size, _tmp_fmt, __VA_ARGS__); \ - BT_ASSERT_DBG(_count >= 0); \ + _Pragma("GCC diagnostic pop") \ + BT_ASSERT_DBG(_count >= 0); \ *buf_ch += MIN(_count, _size); \ } while (0)