[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [6453] Forestall gcc-4.9.2 "unused" warnings
From: |
Greg Chicares |
Subject: |
[lmi-commits] [6453] Forestall gcc-4.9.2 "unused" warnings |
Date: |
Mon, 21 Dec 2015 01:27:39 +0000 |
Revision: 6453
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6453
Author: chicares
Date: 2015-12-21 01:27:39 +0000 (Mon, 21 Dec 2015)
Log Message:
-----------
Forestall gcc-4.9.2 "unused" warnings
Modified Paths:
--------------
lmi/trunk/bcc_ld.cpp
lmi/trunk/math_functors_test.cpp
Modified: lmi/trunk/bcc_ld.cpp
===================================================================
--- lmi/trunk/bcc_ld.cpp 2015-12-21 01:20:49 UTC (rev 6452)
+++ lmi/trunk/bcc_ld.cpp 2015-12-21 01:27:39 UTC (rev 6453)
@@ -72,10 +72,12 @@
return t;
}
+#if 0 // Potentially useful, yet unused.
bool begins_with(std::string const& s, std::string const& prefix)
{
return prefix == s.substr(0, prefix.size());
}
+#endif // 0
bool ends_with(std::string const& s, std::string const& suffix)
{
Modified: lmi/trunk/math_functors_test.cpp
===================================================================
--- lmi/trunk/math_functors_test.cpp 2015-12-21 01:20:49 UTC (rev 6452)
+++ lmi/trunk/math_functors_test.cpp 2015-12-21 01:27:39 UTC (rev 6453)
@@ -30,11 +30,12 @@
#include "fenv_lmi.hpp"
#include "materially_equal.hpp"
+#include "miscellany.hpp" // stifle_warning_for_unused_value()
#include "test_tools.hpp"
#include "timer.hpp"
-#include <algorithm> // std::min()
-#include <cmath> // std::pow()
+#include <algorithm> // std::min()
+#include <cmath> // std::pow()
#include <functional>
#include <iomanip>
#include <limits>
@@ -186,6 +187,7 @@
void mete0()
{
volatile double x;
+ stifle_warning_for_unused_value(x);
x = i_upper_12_over_12_from_i_naive<double>()(0.04);
x = i_from_i_upper_12_over_12_naive<double>()(0.04);
x = d_upper_12_from_i_naive <double>()(0.04);
@@ -196,6 +198,7 @@
void mete1()
{
volatile double x;
+ stifle_warning_for_unused_value(x);
x = i_upper_12_over_12_from_i<double>()(0.04);
x = i_from_i_upper_12_over_12<double>()(0.04);
x = d_upper_12_from_i <double>()(0.04);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [6453] Forestall gcc-4.9.2 "unused" warnings,
Greg Chicares <=