From 8abd32bd81b86e633470ff89de32f9726ebd8f12 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 3 Dec 2003 01:21:32 +0000 Subject: [PATCH] Clean up warnings on Borland C++ 5.5 [SVN r21095] --- test/function_n_test.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/function_n_test.cpp b/test/function_n_test.cpp index eb22776..e993c39 100644 --- a/test/function_n_test.cpp +++ b/test/function_n_test.cpp @@ -51,8 +51,8 @@ test_zero_args() { typedef function0 func_void_type; - write_five_obj five; - write_three_obj three; + write_five_obj five = write_five_obj(); // Initialization for Borland C++ 5.5 + write_three_obj three = write_three_obj(); // Ditto // Default construction func_void_type v1; @@ -472,7 +472,8 @@ test_zero_args() BOOST_TEST(global_int == 5); // Const vs. non-const - write_const_1_nonconst_2 one_or_two; + // Initialization for Borland C++ 5.5 + write_const_1_nonconst_2 one_or_two = write_const_1_nonconst_2(); const function0 v7(one_or_two); function0 v8(one_or_two); @@ -495,9 +496,9 @@ test_zero_args() // Test return values typedef function0 func_int_type; - generate_five_obj gen_five; - generate_three_obj gen_three; - + // Initialization for Borland C++ 5.5 + generate_five_obj gen_five = generate_five_obj(); + generate_three_obj gen_three = generate_three_obj(); func_int_type i0(gen_five); BOOST_TEST(i0() == 5); @@ -530,7 +531,7 @@ test_zero_args() static void test_one_arg() { - negate neg; + negate neg = negate(); // Initialization for Borland C++ 5.5 function1 f1(neg); BOOST_TEST(f1(5) == -5);