lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [5953] Avoid g++-4.9.1 warnings about unused functions and


From: Greg Chicares
Subject: [lmi-commits] [5953] Avoid g++-4.9.1 warnings about unused functions and typedefs
Date: Fri, 03 Oct 2014 00:19:18 +0000

Revision: 5953
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5953
Author:   chicares
Date:     2014-10-03 00:19:16 +0000 (Fri, 03 Oct 2014)
Log Message:
-----------
Avoid g++-4.9.1 warnings about unused functions and typedefs

Modified Paths:
--------------
    lmi/trunk/actuarial_table.cpp
    lmi/trunk/custom_io_0.cpp
    lmi/trunk/interest_rates.cpp
    lmi/trunk/istream_to_string.hpp

Modified: lmi/trunk/actuarial_table.cpp
===================================================================
--- lmi/trunk/actuarial_table.cpp       2014-09-30 13:47:15 UTC (rev 5952)
+++ lmi/trunk/actuarial_table.cpp       2014-10-03 00:19:16 UTC (rev 5953)
@@ -907,6 +907,7 @@
     return v;
 }
 
+#if defined LMI_USE_XML_TABLES
 namespace
 {
     bool almost_equal_doubles(std::vector<double> const& a, 
std::vector<double> const& b)
@@ -936,6 +937,7 @@
         return true;
     }
 } // Unnamed namespace.
+#endif // defined LMI_USE_XML_TABLES
 
 std::vector<double> actuarial_table_rates
     (std::string const& table_filename

Modified: lmi/trunk/custom_io_0.cpp
===================================================================
--- lmi/trunk/custom_io_0.cpp   2014-09-30 13:47:15 UTC (rev 5952)
+++ lmi/trunk/custom_io_0.cpp   2014-10-03 00:19:16 UTC (rev 5953)
@@ -144,6 +144,8 @@
     return InputSequence(general_account_rate).mathematical_representation();
 }
 
+#if 0
+// This unit test is not routinely run.
 void test_adjust_interest_rates()
 {
     std::vector<double> declared_rate;
@@ -192,7 +194,7 @@
         ;
     warning() << std::flush;
 }
-
+#endif // 0
 } // Unnamed namespace.
 
 /// Read custom input for a particular customer.

Modified: lmi/trunk/interest_rates.cpp
===================================================================
--- lmi/trunk/interest_rates.cpp        2014-09-30 13:47:15 UTC (rev 5952)
+++ lmi/trunk/interest_rates.cpp        2014-10-03 00:19:16 UTC (rev 5953)
@@ -227,9 +227,16 @@
         }
 }
 
+#if 0
 /// Determine whether loan rates are needed; else they can be zero.
 ///
 /// Loan rates can potentially affect GPT calculations.
+///
+/// SOMEDAY !! Is this function worthwhile, or should it be expunged?
+/// An error in its implementation could have severe consequences, and
+/// the benefit seems slight. At present, it's never called anyway,
+/// because BasicValues::Init7702() is called unconditionally--so the
+/// test for 'DefinitionOfLifeInsurance' is incorrect.
 
 bool need_loan_rates(yare_input const& yi)
 {
@@ -244,6 +251,7 @@
         ||  !each_equal(yi.NewLoan.begin(), yi.NewLoan.end(), 0.0)
         ;
 }
+#endif // 0
 } // Unnamed namespace.
 
 InterestRates::~InterestRates()

Modified: lmi/trunk/istream_to_string.hpp
===================================================================
--- lmi/trunk/istream_to_string.hpp     2014-09-30 13:47:15 UTC (rev 5952)
+++ lmi/trunk/istream_to_string.hpp     2014-10-03 00:19:16 UTC (rev 5953)
@@ -46,10 +46,10 @@
     ,std::basic_string<Char_t,Traits,Allocator>& s
     )
 {
-    typedef std::basic_string<Char_t,Traits,Allocator> string_type;
 #if 0
     // Requires <iterator>.
     typedef std::istreambuf_iterator<Char_t,Traits> bisbi;
+    typedef std::basic_string<Char_t,Traits,Allocator> string_type;
     string_type((bisbi(is)), bisbi()).swap(s);
     if(!is)
         {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]