From 7a83dcd23e27332d318ea16013251567ab560cd4 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 28 Jul 2014 13:30:09 -0700 Subject: [PATCH] Mind the lifetime. --- test/util-test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/util-test.cc b/test/util-test.cc index 2380e797..20f15170 100644 --- a/test/util-test.cc +++ b/test/util-test.cc @@ -127,7 +127,8 @@ TEST(ArgTest, ArgInfo) { } #define EXPECT_ARG_(Char, type_code, MakeArgType, ExpectedType, value) { \ - Arg arg = MakeArg(static_cast(value)); \ + MakeArgType input = static_cast(value); \ + Arg arg = MakeArg(input); \ EXPECT_EQ(Arg::type_code, arg.type); \ ExpectedType expected_value = static_cast(value); \ EXPECT_EQ(expected_value, ArgInfo::get(arg)); \