From da446af3b73a9b7354b89bb5792968cd705359d8 Mon Sep 17 00:00:00 2001 From: ggardet Date: Mon, 25 Jan 2021 18:34:05 +0100 Subject: [PATCH] Fix warning showed with GCC10 (#7336) catching polymorphic type 'struct dmlc::Error' by value --- tests/cpp/ir_functor_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cpp/ir_functor_test.cc b/tests/cpp/ir_functor_test.cc index 9be83987ba57..d242b20f1ba7 100644 --- a/tests/cpp/ir_functor_test.cc +++ b/tests/cpp/ir_functor_test.cc @@ -72,7 +72,7 @@ TEST(IRF, ExprTransform) { try { f(z - 1, 2); LOG(FATAL) << "should fail"; - } catch (dmlc::Error) { + } catch (dmlc::Error&) { } }