From: Adam C. Emerson Date: Fri, 22 Dec 2017 23:44:57 +0000 (-0500) Subject: dout: Remove VLA sanity check X-Git-Tag: wip-pdonnell-testing-20180317.202121~653^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6580d0a6d9dae46fdecfc9bf16f1a5ea36ba970a;p=ceph-ci.git dout: Remove VLA sanity check This doesn't seem to be able to work for C++17 under both GCC and Clang. Maybe there's a better way to do it. I might try routing that argument through a constexpr function in the macro later. Signed-off-by: Adam C. Emerson --- diff --git a/src/common/dout.h b/src/common/dout.h index 60bee71122a..56e768d9afe 100644 --- a/src/common/dout.h +++ b/src/common/dout.h @@ -49,9 +49,6 @@ public: #define dout_impl(cct, sub, v) \ do { \ if (cct->_conf->subsys.should_gather(sub, v)) { \ - if (0) { \ - [[maybe_unused]] char __array[((v >= -1) && (v <= 200)) ? 0 : -1] = {}; \ - } \ static size_t _log_exp_length = 80; \ ceph::logging::Entry *_dout_e = cct->_log->create_entry(v, sub, &_log_exp_length); \ static_assert(std::is_convertible