[mlpack-git] master: Fix all -Wunused-parameter. (eb593ed)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:11:54 EST 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40

>---------------------------------------------------------------

commit eb593eddc8cd71d866bfcfb35d73af59d4899d65
Author: Ryan Curtin <ryan at ratml.org>
Date:   Mon Jan 12 11:17:18 2015 -0500

    Fix all -Wunused-parameter.


>---------------------------------------------------------------

eb593eddc8cd71d866bfcfb35d73af59d4899d65
 src/mlpack/core/kernels/example_kernel.hpp                         | 7 ++++---
 src/mlpack/methods/emst/dtb_rules_impl.hpp                         | 2 +-
 src/mlpack/methods/hmm/hmm_util_impl.hpp                           | 5 +++--
 src/mlpack/methods/kmeans/dual_tree_kmeans_rules_impl.hpp          | 2 +-
 .../methods/softmax_regression/softmax_regression_function.cpp     | 0
 5 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/mlpack/core/kernels/example_kernel.hpp b/src/mlpack/core/kernels/example_kernel.hpp
index 8d0a6d6..d957e7c 100644
--- a/src/mlpack/core/kernels/example_kernel.hpp
+++ b/src/mlpack/core/kernels/example_kernel.hpp
@@ -99,7 +99,8 @@ class ExampleKernel
    * @return K(a, b).
    */
   template<typename VecType>
-  static double Evaluate(const VecType& a, const VecType& b) { return 0; }
+  static double Evaluate(const VecType& /* a */, const VecType& /* b */)
+  { return 0; }
 
   /**
    * Returns a string for the kernel object; in this case, with only the memory
@@ -126,8 +127,8 @@ class ExampleKernel
    * @return the convolution integral value.
    */
   template<typename VecType>
-  static double ConvolutionIntegral(const VecType& a, const VecType& b)
-  { return 0; }
+  static double ConvolutionIntegral(const VecType& /* a */,
+                                    const VecType& /* b */) { return 0; }
 
   /**
    * Obtains the normalizing volume for the kernel with dimension $dimension$.
diff --git a/src/mlpack/methods/emst/dtb_rules_impl.hpp b/src/mlpack/methods/emst/dtb_rules_impl.hpp
index 6d70528..5a91f08 100644
--- a/src/mlpack/methods/emst/dtb_rules_impl.hpp
+++ b/src/mlpack/methods/emst/dtb_rules_impl.hpp
@@ -119,7 +119,7 @@ double DTBRules<MetricType, TreeType>::Score(const size_t queryIndex,
 
 template<typename MetricType, typename TreeType>
 double DTBRules<MetricType, TreeType>::Rescore(const size_t queryIndex,
-                                               TreeType& referenceNode,
+                                               TreeType& /* referenceNode */,
                                                const double oldScore)
 {
   // We don't need to check component membership again, because it can't
diff --git a/src/mlpack/methods/hmm/hmm_util_impl.hpp b/src/mlpack/methods/hmm/hmm_util_impl.hpp
index fa484b5..d3599ab 100644
--- a/src/mlpack/methods/hmm/hmm_util_impl.hpp
+++ b/src/mlpack/methods/hmm/hmm_util_impl.hpp
@@ -49,7 +49,8 @@ void LoadHMM(HMM<Distribution>& hmm, util::SaveRestoreUtility& sr)
  * @param sr SaveRestoreUtility to use.
  */
 template<typename Distribution>
-void ConvertHMM(HMM<Distribution>& hmm, const util::SaveRestoreUtility& sr)
+void ConvertHMM(HMM<Distribution>& /* hmm */,
+                const util::SaveRestoreUtility& /* sr */)
 {
   Log::Fatal << "HMM conversion not implemented for arbitrary distributions."
       << std::endl;
@@ -57,7 +58,7 @@ void ConvertHMM(HMM<Distribution>& hmm, const util::SaveRestoreUtility& sr)
 
 template<>
 void ConvertHMM(HMM<distribution::DiscreteDistribution>& hmm,
-             const util::SaveRestoreUtility& sr)
+                const util::SaveRestoreUtility& sr)
 {
   std::string type;
   size_t states;
diff --git a/src/mlpack/methods/kmeans/dual_tree_kmeans_rules_impl.hpp b/src/mlpack/methods/kmeans/dual_tree_kmeans_rules_impl.hpp
index 33ea4ae..d732ffb 100644
--- a/src/mlpack/methods/kmeans/dual_tree_kmeans_rules_impl.hpp
+++ b/src/mlpack/methods/kmeans/dual_tree_kmeans_rules_impl.hpp
@@ -97,7 +97,7 @@ inline force_inline double DualTreeKMeansRules<MetricType, TreeType>::BaseCase(
 
 template<typename MetricType, typename TreeType>
 double DualTreeKMeansRules<MetricType, TreeType>::Score(
-    const size_t queryIndex,
+    const size_t /* queryIndex */,
     TreeType& referenceNode)
 {
   // Update from previous iteration, if necessary.



More information about the mlpack-git mailing list